summaryrefslogtreecommitdiff
path: root/script-checker
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-03-18 15:00:16 -0300
committershennetsind <ind@henn.et>2014-03-18 15:00:16 -0300
commit7b71f22331c805a406c57f5a8eff93b464b57018 (patch)
treeed65b87c241aa123d46ed32f13257d487e3dfe71 /script-checker
parent4cc9d5f91cf6276e28cc02bb75fc4158d28d553b (diff)
parent21aeb5aa1d5fee9702aba476a94b800c94b29859 (diff)
downloadhercules-7b71f22331c805a406c57f5a8eff93b464b57018.tar.gz
hercules-7b71f22331c805a406c57f5a8eff93b464b57018.tar.bz2
hercules-7b71f22331c805a406c57f5a8eff93b464b57018.tar.xz
hercules-7b71f22331c805a406c57f5a8eff93b464b57018.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'script-checker')
-rwxr-xr-xscript-checker19
1 files changed, 14 insertions, 5 deletions
diff --git a/script-checker b/script-checker
index 521cf9025..f4a277e2d 100755
--- a/script-checker
+++ b/script-checker
@@ -14,12 +14,21 @@ if [ -z "$1" ]; then
echo "Usage: $0 <path to the script>"
echo " (you may use a relative or absolute path)"
exit -1
-elif [[ "$1" =~ ^\/ ]]; then
- FILE="$1"
-else
- FILE="${ORIG_CWD}/$1"
fi
if [ ! -x "$EXECUTABLE" ]; then
exit -1
fi
-"$EXECUTABLE" --script-check "${FILE}" 2>&1
+
+while [ -n "$1" ]; do
+ [ -n "$FILES" ] && FILES="${FILES}!"
+ if [[ "$1" =~ ^\/ ]]; then
+ FILES="${FILES}--load-script!$1"
+ else
+ FILES="${FILES}--load-script!${ORIG_CWD}/$1"
+ fi
+ shift
+done
+
+# We assume that filenames don't contain exclamation marks.
+IFS=!
+"$EXECUTABLE" --script-check $FILES 2>&1