From 057bb7b61a87cba52fa2c5e4c0308c2e31e56b26 Mon Sep 17 00:00:00 2001 From: Botspot Date: Sat, 14 Aug 2021 23:02:12 -0500 Subject: [PATCH] updater: use curly brackets to prevent file-modification bash errors --- updater | 2 ++ 1 file changed, 2 insertions(+) diff --git a/updater b/updater index 98a3243..f85978f 100755 --- a/updater +++ b/updater @@ -1,5 +1,6 @@ #!/bin/bash +{ #this curly brace at start and end of script prevents issues when this script edits itself. See: https://stackoverflow.com/a/19430939 DIRECTORY="$(readlink -f "$(dirname "$0")")" function error { @@ -301,3 +302,4 @@ yad --form --text='Pi-Apps updates complete.' \ --button="Close!${DIRECTORY}/icons/exit.png":1 exit 0 +} #this curly brace at start and end of script prevents issues when this script updates itself. See: https://stackoverflow.com/a/19430939