projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a12a15f
)
Check for shell scripts that are not POSIX
master
author
Colin Clark
<colin.clark@cclark.uk>
Sun, 12 May 2024 16:26:35 +0000
(17:26 +0100)
committer
Colin Clark
<colin.clark@cclark.uk>
Sun, 12 May 2024 16:26:35 +0000
(17:26 +0100)
scripts/test-ancillary-files.sh
patch
|
blob
|
history
diff --git
a/scripts/test-ancillary-files.sh
b/scripts/test-ancillary-files.sh
index
ad1caba
..
ac3e673
100755
(executable)
--- a/
scripts/test-ancillary-files.sh
+++ b/
scripts/test-ancillary-files.sh
@@
-42,11
+42,28
@@
fi
exit_status=0
exit_status=0
+# All script files must be POSIX
+# downsize is a third-party file and is excluded
+while read -r file
+do
+ result=$(file "$file" | grep "shell script")
+
+ if [ -n "$result" ]
+ then
+ if [ "${result#*"POSIX"}" = "$result" ]
+ then
+ printf "ERROR; Executable script is not POSIX: %s\n" "$file"
+ exit_status=1
+ fi
+ fi
+done << EOF
+$(find "$1/plugins" "$1/src" "$1/scripts" -type f -not -name downsize -executable)
+EOF
+
# Script files must have the file extension .sh or
# be symlinked as so - for doxygen
while read -r file
do
# Script files must have the file extension .sh or
# be symlinked as so - for doxygen
while read -r file
do
- #~ check_sh
result=$(file "$file" | grep "POSIX shell script")
if [ -n "$result" ]
result=$(file "$file" | grep "POSIX shell script")
if [ -n "$result" ]