adding option to remove cache godot
This commit is contained in:
parent
3ee3ab7656
commit
5a310fb4e2
1 changed files with 8 additions and 0 deletions
|
@ -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 <File> : target godot file (downloaded)
|
||||
-s <Url> : 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
|
||||
|
|
Loading…
Reference in a new issue