fix errors when running gui script

pull/516/head
Botspot 5 years ago
parent 23e9cb0eff
commit 651eaa734b

7
gui

@ -32,14 +32,15 @@ runonce() {
runonce_hash="$(echo "$@" | sha256sum | awk '{print $1}')" runonce_hash="$(echo "$@" | sha256sum | awk '{print $1}')"
if grep -q "$runonce_hash" "${DIRECTORY}/data/runonce_hashes" ;then if grep -q "$runonce_hash" "${DIRECTORY}/data/runonce_hashes" ;then
#hash found #hash found
echo "runonce: '$@' already run before. Skipping." #echo "runonce: '$@' already run before. Skipping."
true
else else
#run the command. #run the command.
bash <(echo "$@") bash <(echo "$@")
#if it succeeds, add the hash to the list to never run it again #if it succeeds, add the hash to the list to never run it again
if [ $? == 0 ];then if [ $? == 0 ];then
echo "$runonce_hash" >> "${DIRECTORY}/data/runonce_hashes" echo "$runonce_hash" >> "${DIRECTORY}/data/runonce_hashes"
echo "'$@' succeeded. Added to list." #echo "'$@' succeeded. Added to list."
else else
echo "'$@' failed. Not adding hash to list." echo "'$@' failed. Not adding hash to list."
fi fi
@ -77,7 +78,7 @@ runonce "
runonce " runonce "
if [ -f /usr/local/bin/twistver ] && if [[ $(twistver) != 'Twister OS version'* ]] ;then if [ -f /usr/local/bin/twistver ] && [[ "\$"(twistver) != 'Twister OS version'* ]] ;then
'${DIRECTORY}/install' '${DIRECTORY}/install'
fi" fi"

Loading…
Cancel
Save