From 4997e5cb17997547bb627c43d9cd52d2e5af5471 Mon Sep 17 00:00:00 2001 From: Robbie Vercammen Date: Fri, 19 Jul 2019 00:29:28 +0200 Subject: [PATCH 1/4] Added quotes to the includes so that directory with spaces are recognized correctly --- bootstrap-vitasdk.sh | 2 +- install-all.sh | 2 +- vitasdk-update | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-vitasdk.sh b/bootstrap-vitasdk.sh index dde32bf..5305256 100755 --- a/bootstrap-vitasdk.sh +++ b/bootstrap-vitasdk.sh @@ -5,7 +5,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" INSTALLDIR="${VITASDK:-/usr/local/vitasdk}" -. $DIR/include/install-vitasdk.sh +. "$DIR/include/install-vitasdk.sh" if [ -d "$INSTALLDIR" ]; then echo "$INSTALLDIR already exists. Remove it first (e.g. 'sudo rm -rf $INSTALLDIR' or 'rm -rf $INSTALLDIR') and then restart this script" diff --git a/install-all.sh b/install-all.sh index 33e3de6..5ffcfed 100755 --- a/install-all.sh +++ b/install-all.sh @@ -4,6 +4,6 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -. $DIR/include/install-packages.sh +. "$DIR/include/install-packages.sh" install_packages diff --git a/vitasdk-update b/vitasdk-update index c3e4839..7a9df5e 100755 --- a/vitasdk-update +++ b/vitasdk-update @@ -10,8 +10,8 @@ if [ -z "$VITASDK" ]; then exit 1 fi -. $DIR/include/install-vitasdk.sh -. $DIR/include/install-packages.sh +. "$DIR/include/install-vitasdk.sh" +. "$DIR/include/install-packages.sh" echo "==> Updating vitasdk" install_vitasdk $VITASDK From a8e835ec91035a7b8220cb1f9993497360a33b44 Mon Sep 17 00:00:00 2001 From: Robbie Vercammen Date: Fri, 19 Jul 2019 01:38:10 +0200 Subject: [PATCH 2/4] INSTALLDIR will be removed if install_vitasdk fails --- bootstrap-vitasdk.sh | 8 +++++++- include/.install-vitasdk.sh.swp | Bin 0 -> 12288 bytes include/install-vitasdk.sh | 17 +++++++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 include/.install-vitasdk.sh.swp diff --git a/bootstrap-vitasdk.sh b/bootstrap-vitasdk.sh index 5305256..b85b1f8 100755 --- a/bootstrap-vitasdk.sh +++ b/bootstrap-vitasdk.sh @@ -5,6 +5,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" INSTALLDIR="${VITASDK:-/usr/local/vitasdk}" +fallback_fail() { + echo "FAIL: removing $INSTALLDIR" + sudo rm -rf $INSTALLDIR + exit 1 +} + . "$DIR/include/install-vitasdk.sh" if [ -d "$INSTALLDIR" ]; then @@ -13,7 +19,7 @@ if [ -d "$INSTALLDIR" ]; then fi echo "==> Installing vitasdk to $INSTALLDIR" -install_vitasdk $INSTALLDIR +install_vitasdk $INSTALLDIR || fallback_fail echo "Please add the following to the bottom of your .bashrc:" printf "\033[0;36m""export VITASDK=${INSTALLDIR}""\033[0m\n" diff --git a/include/.install-vitasdk.sh.swp b/include/.install-vitasdk.sh.swp new file mode 100644 index 0000000000000000000000000000000000000000..be97c12ac3b9835fe62a2a20f4ba24edb4b4e44b GIT binary patch literal 12288 zcmeI2%WoS+9LFbc;!&vJg2d$)$BL3hvm4u0XcGk}O;s7?QS79ppvsJQH{Ox=rJZpe zv;po&Nc-)Ai$eS=YWIHo{ZTYQR=B^ ztoBD^9l9&&ZW5)+H*RKjv{e);ukUWAX=L0uO_NCXLhFX9vF?ta#jZ}gXy6CPja5-3 zi#EpZJ0=_(iHmH24V*S`K{V>M;Z>iiOw!9QZJn;dPuKt(U;}J`4X^<=zy{a=8#uQH zY&Ic2#_FCbSJ)`?iLtyaa>fSO02^QfY=8~00XDz}*Z><~18jf|Jb?z3FT{_}2=Vo^ zm^}Xf|M&O*-!BUB2lyTQ1bQFSVTZ)LGp3bxtxn zG5+CDTkFktm$y}9g3;J(?Yr&L#=_(Vlj8TcvTq~Ksxx7s&ai`5zJ zlkAnn+2hJiHabgcSwnBr`!q??$0i-^c!lmQkqr@qO~Z6-7UeutW@WMOWo$G>y6Y`S z-MF$)d~DQ>^}V^dve5Iq8fD6Q;qg&rf-&!Jwyxc7whzWeTrE7DhYd~5iS0aVCk_w) zipp^tuxcW&coX2-3=$OwBn^&)PKtNP(H<>VYofH@DepVY%+h@!4vG#2d4zVW6k3~^ zMc3_V8xFb-uCQCy9_BI(lpo~A&DE|ux{|JAbG4(5 Date: Fri, 19 Jul 2019 01:49:08 +0200 Subject: [PATCH 3/4] removed wap file --- include/.install-vitasdk.sh.swp | Bin 12288 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 include/.install-vitasdk.sh.swp diff --git a/include/.install-vitasdk.sh.swp b/include/.install-vitasdk.sh.swp deleted file mode 100644 index be97c12ac3b9835fe62a2a20f4ba24edb4b4e44b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2%WoS+9LFbc;!&vJg2d$)$BL3hvm4u0XcGk}O;s7?QS79ppvsJQH{Ox=rJZpe zv;po&Nc-)Ai$eS=YWIHo{ZTYQR=B^ ztoBD^9l9&&ZW5)+H*RKjv{e);ukUWAX=L0uO_NCXLhFX9vF?ta#jZ}gXy6CPja5-3 zi#EpZJ0=_(iHmH24V*S`K{V>M;Z>iiOw!9QZJn;dPuKt(U;}J`4X^<=zy{a=8#uQH zY&Ic2#_FCbSJ)`?iLtyaa>fSO02^QfY=8~00XDz}*Z><~18jf|Jb?z3FT{_}2=Vo^ zm^}Xf|M&O*-!BUB2lyTQ1bQFSVTZ)LGp3bxtxn zG5+CDTkFktm$y}9g3;J(?Yr&L#=_(Vlj8TcvTq~Ksxx7s&ai`5zJ zlkAnn+2hJiHabgcSwnBr`!q??$0i-^c!lmQkqr@qO~Z6-7UeutW@WMOWo$G>y6Y`S z-MF$)d~DQ>^}V^dve5Iq8fD6Q;qg&rf-&!Jwyxc7whzWeTrE7DhYd~5iS0aVCk_w) zipp^tuxcW&coX2-3=$OwBn^&)PKtNP(H<>VYofH@DepVY%+h@!4vG#2d4zVW6k3~^ zMc3_V8xFb-uCQCy9_BI(lpo~A&DE|ux{|JAbG4(5 Date: Fri, 19 Jul 2019 12:50:04 +0200 Subject: [PATCH 4/4] Fixed path with spaces to vdpm --- include/install-packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/install-packages.sh b/include/install-packages.sh index 02b86c6..0f4f867 100755 --- a/include/install-packages.sh +++ b/include/install-packages.sh @@ -5,7 +5,7 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" b() { - $DIR/../vdpm $1 + "$DIR/../vdpm" $1 } install_packages() {