init.sh/maintainer.sh
2024-06-29 20:18:46 +03:00

50 lines
1.1 KiB
Bash
Executable File

if [ ! "$BASH_VERSION" ] ; then
bash $0 $1 $2 $3 $4 $5 $6 $7 $8 $9
exit 1
fi
wiBold=$(tput bold)
wiNormal=$(tput sgr0)
echo ""
echo ""
echo ""
echo "=============================="
echo -n "$wiBold"
echo " Warén Group "
echo -n "$wiNormal"
echo " Init "
echo "=============================="
echo " >> Maintainer << "
echo "------------------------------"
case $1 in
build)
echo "Building..."
podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php &> /dev/null
chmod +x init.sh &> /dev/null
;;
update)
echo "Updating..."
cp ../wx/src/functions/header.sh src/functions/header.sh
cp ../wx/src/functions/repeat.sh src/functions/repeat.sh
cp ../wx/src/commands/auth/login.sh src/functions/login.sh
;;
ready)
echo "Ready"
;;
*)
echo "Initializing..."
sleep 3
./$0 update
sleep 3
./$0 build
sleep 3
./$0 ready
;;
esac
echo " "
echo " "
echo " "
exit 1