diff options
Diffstat (limited to 'libexec')
-rwxr-xr-x | libexec/app-resolver-maven | 1 | ||||
-rwxr-xr-x | libexec/app-run-hook | 10 | ||||
-rwxr-xr-x | libexec/app-set-version | 7 |
3 files changed, 15 insertions, 3 deletions
diff --git a/libexec/app-resolver-maven b/libexec/app-resolver-maven index 7f01992..118223a 100755 --- a/libexec/app-resolver-maven +++ b/libexec/app-resolver-maven @@ -175,6 +175,7 @@ download_version() { echo "Downloading $group_id:$artifact_id:$resolved_version..." get $r $l + rm -f "$target" ln -s "`pwd`/$l" "$target" } diff --git a/libexec/app-run-hook b/libexec/app-run-hook index f1b2457..9322fe4 100755 --- a/libexec/app-run-hook +++ b/libexec/app-run-hook @@ -43,7 +43,13 @@ then exit 0 fi -# TODO: remove after -#chmod +x $bin +chmod +x $bin + +if [[ ! -e $bin ]] +then + info "Not executable: $bin" + exit 0 +fi + debug "Running hook: $hook" run_app -v $version hooks/$hook diff --git a/libexec/app-set-version b/libexec/app-set-version index 4c8e797..0abb9b8 100755 --- a/libexec/app-set-version +++ b/libexec/app-set-version @@ -8,6 +8,10 @@ APPSH_HOME=$(cd $(dirname "$0")/.. && pwd) . $APPSH_HOME/lib/common # HEADER END +usage_text() { + echo "usage: $usage_app -v <version>" +} + version= while getopts "v:" opt @@ -43,7 +47,8 @@ then prev=${prev:1} prev=${prev/%?root} echo "Changing current symlink from $prev to $version" - ln -f -s versions/$version/root current + rm current + ln -s versions/$version/root current else echo "Creating current symlink for version $version" ln -s versions/$version/root current |