Move tar functions into sourceable functions file

This commit is contained in:
Jose Diaz-Gonzalez authored and Michael Hobbs committed 2016-06-17 13:55:43 -07:00
1 parent 2cb20f3fd0
commit aca2540651
5 files changed
+74 -71

No files matched your search

+1 -14
View File
@@ -1,18 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
tar_build_cmd() {
declare desc="calls tar:build-locked via command line"
local cmd="tar:build"
verify_app_name "$2"
local APP="$2"; local APP_BUILD_LOCK="$DOKKU_ROOT/$APP/.build.lock"
local APP_BUILD_LOCK_MSG="$APP is currently being deployed or locked. Waiting..."
[[ $(flock -n "$APP_BUILD_LOCK" true &>/dev/null ; echo $?) -ne 0 ]] && echo "$APP_BUILD_LOCK_MSG"
shift 1
flock -o "$APP_BUILD_LOCK" dokku tar:build-locked "$@"
}
source "$PLUGIN_AVAILABLE_PATH/tar/functions"
tar_build_cmd "$@"