Shell Recorder: Restructure code
set -f
-FILE=$1
-Mountpoint=
-DBFile=
-Storage=
-MountArgs=
-DiffType=File
-OutFile=$(mktempfile_elektra)
-
-RETCMP=
-ERRORSCMP=
-WARNINGSCMP=
-STDOUTCMP=
-STDOUTRECMP=
-STDERRCMP=
-DIFFCMP=
-
-BACKUP=0
-TMPFILE=$(mktempfile_elektra)
-
-# variables to count up errors and tests
-nbError=0
-nbTest=0
+# -- Functions -----------------------------------------------------------------------------------------------------------------------------
execute()
{
@@ -300,6 +279,31 @@ run_script()
done < "$FILE"
}
+# -- Main ----------------------------------------------------------------------------------------------------------------------------------
+
+FILE=$1
+Mountpoint=
+DBFile=
+Storage=
+MountArgs=
+DiffType=File
+OutFile=$(mktempfile_elektra)
+
+RETCMP=
+ERRORSCMP=
+WARNINGSCMP=
+STDOUTCMP=
+STDOUTRECMP=
+STDERRCMP=
+DIFFCMP=
+
+BACKUP=0
+TMPFILE=$(mktempfile_elektra)
+
+# variables to count up errors and tests
+nbError=0
+nbTest=0
+
rm -f ./stdout ./stderr
if [ "$#" -lt '1' ] || [ "$#" -gt '2' ];
