summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2016-05-08 00:51:38 -0400
committerTim Harder <radhermit@gmail.com>2016-05-08 00:51:38 -0400
commit094f77299983f02300f339a9f1b8cc018881b238 (patch)
tree74c3d190df1b7df8031aa1e91c4fe50b5dd76f13
parentshell/pkgcore.sh: drop quotes on regex so it works for bash (diff)
downloadpkgcore-094f77299983f02300f339a9f1b8cc018881b238.tar.gz
pkgcore-094f77299983f02300f339a9f1b8cc018881b238.tar.bz2
pkgcore-094f77299983f02300f339a9f1b8cc018881b238.zip
shell/bin/pkgcore-sh-helper: exit out if not running via a script
-rwxr-xr-xshell/bin/pkgcore-sh-helper3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/bin/pkgcore-sh-helper b/shell/bin/pkgcore-sh-helper
index a5aa03d4..96e2a03f 100755
--- a/shell/bin/pkgcore-sh-helper
+++ b/shell/bin/pkgcore-sh-helper
@@ -1,5 +1,8 @@
#!/usr/bin/env sh
+# exit out if not running via an external script
+[ -z "$1" ] && exit 1
+
SCRIPT_PATH=$1
SCRIPT=$(basename ${SCRIPT_PATH})
shift