ref
This commit is contained in:
parent
4beb245aa4
commit
58fe1ab39d
16
install
16
install
@ -91,8 +91,8 @@ __install_from_sandbox() (
|
||||
|
||||
_execute_hook_if_executable() (
|
||||
# all hooks gets SUB and SANDBOX_PATH env variables
|
||||
target="$1"
|
||||
hook_name="$2"
|
||||
target="${1}"
|
||||
hook_name="${2}"
|
||||
|
||||
hook_path="${DOTFILES_ROOT}/install-hooks/${target}/${hook_name}"
|
||||
if [ -x "${hook_path}" ]; then
|
||||
@ -118,7 +118,7 @@ recursive_execute_pre_hooks() (
|
||||
)
|
||||
|
||||
execute_post_hook() (
|
||||
_execute_hook_if_executable "$1" "post-install"
|
||||
_execute_hook_if_executable "${1}" "post-install"
|
||||
)
|
||||
|
||||
recursive_execute_post_hooks() (
|
||||
@ -163,7 +163,7 @@ is_target_installed() (
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if $not_fully_installed; then
|
||||
if ${not_fully_installed}; then
|
||||
echo "Target '${1}' not fully installed"
|
||||
echo
|
||||
return 1
|
||||
@ -183,7 +183,7 @@ find_targets_that_depend_on() (
|
||||
)
|
||||
|
||||
die_if_installed_targets_depend_on() (
|
||||
for reverse_dependecy in $(find_targets_that_depend_on "$1")
|
||||
for reverse_dependecy in $(find_targets_that_depend_on "${1}")
|
||||
do
|
||||
if is_target_installed "${reverse_dependecy}" >/dev/null; then
|
||||
_die "target '${reverse_dependecy}' is depends on installed target '${1}'. Exiting..." 1
|
||||
@ -219,7 +219,7 @@ cmd_list() (
|
||||
)
|
||||
|
||||
target_exists() (
|
||||
target="$1"
|
||||
target="${1}"
|
||||
map_key_exists "${TARGETS}" "${target}"
|
||||
)
|
||||
|
||||
@ -230,7 +230,7 @@ cmd_install() (
|
||||
SANDBOX_PATH="$(mktemp -td "${USER:-user}.dotfiles_XXXXXXX")"
|
||||
export SANDBOX_PATH
|
||||
install_target "${target}"
|
||||
rm -rf "$SANDBOX_PATH"
|
||||
rm -rf "${SANDBOX_PATH}"
|
||||
else
|
||||
cmd_no_target
|
||||
fi
|
||||
@ -252,6 +252,6 @@ case "${executed_command}" in
|
||||
check) shift; is_target_installed "$@" ;;
|
||||
list) shift; cmd_list "$@" ;;
|
||||
help) shift; cmd_help "$@" ;;
|
||||
*) shift; cmd_install "$executed_command" "$@" ;;
|
||||
*) shift; cmd_install "${executed_command}" "$@" ;;
|
||||
esac
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user