diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-27 23:30:49 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-27 23:30:49 +0100 |
commit | e694d9024cddf4dd54efd828927e3fd5e70b6c3a (patch) | |
tree | dcefc5f39fc837736b9822b7446d2b6eb4e6f802 /libexec/app-resolver-file | |
parent | 38d7ffca0b591694c17509d20c8bf55606e60536 (diff) | |
download | app.sh-e694d9024cddf4dd54efd828927e3fd5e70b6c3a.tar.gz app.sh-e694d9024cddf4dd54efd828927e3fd5e70b6c3a.tar.bz2 app.sh-e694d9024cddf4dd54efd828927e3fd5e70b6c3a.tar.xz app.sh-e694d9024cddf4dd54efd828927e3fd5e70b6c3a.zip |
o Removing all old code (X files).
o Making sure APPSH_HOME is 1) exported and, 2) always prepended to
$PATH.
o More documentation on what a zip file actually looks like and how to
create hooks.
Diffstat (limited to 'libexec/app-resolver-file')
-rwxr-xr-x | libexec/app-resolver-file | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libexec/app-resolver-file b/libexec/app-resolver-file index 5aedf88..2b708e8 100755 --- a/libexec/app-resolver-file +++ b/libexec/app-resolver-file @@ -3,7 +3,7 @@ set -e set -u -APPSH_HOME=$(cd $(dirname "$0")/.. && pwd) +export APPSH_HOME=$(cd $(dirname "$0")/.. && pwd) . $APPSH_HOME/lib/common # HEADER END @@ -31,7 +31,12 @@ init() { local file=${1-} - if [[ ! -r "$file" ]] + if [[ ! $file =~ ^/ ]] + then + fatal "The file's path must be absolute." + fi + + if [[ ! -r $file ]] then fatal "Can't read file: $file" fi |