From 5a310fb4e2932f9e440468e20c0035617e308b45 Mon Sep 17 00:00:00 2001 From: AleaJactaEst Date: Mon, 28 Mar 2022 22:44:23 +0200 Subject: [PATCH] adding option to remove cache godot --- start-khanat-client.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/start-khanat-client.sh b/start-khanat-client.sh index dd6d08a..a477b2b 100755 --- a/start-khanat-client.sh +++ b/start-khanat-client.sh @@ -5,6 +5,7 @@ declare HELP=0 declare EDITOR=0 declare FORCE=0 declare IMPORT=0 +declare ERASEIMPORT=0 declare WORKDIR="$(dirname $(readlink -f $0))" declare GODOT_SRC="https://downloads.tuxfamily.org/godotengine/4.0/alpha5/Godot_v4.0-alpha5_linux.64.zip" declare OUTZIP="$WORKDIR/$(basename $GODOT_SRC)" @@ -95,6 +96,7 @@ do s) GODOT_SRC=${OPTARG};; f) FORCE=1;; i) IMPORT=1;; + x) ERASEIMPORT=1;; *) HELP=1;; esac done @@ -109,6 +111,7 @@ $(basename $0) [Option] : Donwload Launch Godot -e : Start Godot in editor mode -f : force download & uncompress -i : force import data + -x : erase import data -o : target godot file (downloaded) -s : Url to download a specific godot version EOF @@ -121,6 +124,11 @@ download "$GODOT_SRC" "$OUTZIP" EXE=$(extract "$OUTZIP") msg_info "Prg:$EXE" +if [ $ERASEIMPORT -ne 0 ] +then + rm -f $WORKDIR/.godot/imported/* +fi + if [ $IMPORT -ne 0 ] then $WORKDIR/$EXE --editor --quit