Final (I hope it is) fixes on installation script.

This commit is contained in:
clsty
2023-12-30 11:34:45 +08:00
parent 1c96a7a911
commit c5f956e327
+9 -4
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd "$(dirname "$0")" cd "$(dirname "$0")"
export base="$(pwd)"
function try { "$@" || sleep 0; } function try { "$@" || sleep 0; }
function v() { function v() {
@@ -58,18 +59,22 @@ sleep 1
installags (){ installags (){
v git clone --recursive https://github.com/Aylur/ags.git|| \ v git clone --recursive https://github.com/Aylur/ags.git|| \
if [ -d ags ];then printf "\e[36mSeems \"./ags\" already exists.\e[97m\n";else exit 1;fi if [ -d ags ];then
cd ags printf "\e[36mSeems \"./ags\" already exists.\e[97m\n"
cd ags
v git pull
else exit 1
fi
v npm install v npm install
v meson setup build v meson setup build
v meson install -C build v meson install -C build
cd $base
} }
if command -v ags >/dev/null 2>&1 if command -v ags >/dev/null 2>&1
then echo "Command ags already exists." then echo -e "\e[34mCommand \"ags\" already exists. Won't install ags.\e[0m"
else installags else installags
fi fi
cd "$(dirname "$0")"
##################################################################################### #####################################################################################
printf '\e[36m3. Copying\e[97m\n' printf '\e[36m3. Copying\e[97m\n'