diff --git a/README.md b/README.md index 8b78697..19eb7d4 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ Config files for: Prompt

-You can add your files to the `~/.config/zsh/zshrc.d` directory for zsh so that they automatically run in ascending order when you open a terminal.\ +You can add your files to the `~/.config/zsh/zshrc.d` directory for zsh so +that they automatically run in ascending order when you open a terminal.\ Example:\ `~/.config/zsh/zshrc.d/01_hello.sh` ```sh diff --git a/install b/install index b85a2a1..7d42d48 100755 --- a/install +++ b/install @@ -211,7 +211,7 @@ cmd_unlink() ( ) cmd_no_target() ( - _die "TARGET not exists" 1 + _die "TARGET '${1}' not exists" 1 ) cmd_list() ( @@ -226,14 +226,14 @@ target_exists() ( cmd_install() ( for target in "$@" do - if target_exists "${target}"; then - SANDBOX_PATH="$(mktemp -td "${USER:-user}.dotfiles_XXXXXXX")" - export SANDBOX_PATH - install_target "${target}" - rm -rf "${SANDBOX_PATH}" - else - cmd_no_target + if ! target_exists "${target}"; then + cmd_no_target "${target}" fi + + SANDBOX_PATH="$(mktemp -td "${USER:-user}.dotfiles_XXXXXXX")" + export SANDBOX_PATH + install_target "${target}" + rm -rf "${SANDBOX_PATH}" done )