Skip to content

Commit

Permalink
fix(install): use script directory for all relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccaffery committed Dec 16, 2020
1 parent 59a8587 commit 8f23fb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ __am_prompt_install() {
__am_prompt_success "creating backup path: $BACKUP_PATH"
mkdir -p "$BACKUP_PATH" 1>/dev/null

for TEMPLATE in template/*; do
for TEMPLATE in $SCRIPT_DIR/template/*; do
local TEMPLATE_NAME=$(basename "$TEMPLATE")
local TEMPLATE_PATH="$HOME/.${TEMPLATE_NAME}"

Expand Down Expand Up @@ -68,7 +68,7 @@ __am_prompt_install() {
cp -Rf "$SCRIPT_DIR/src/zsh" "$AM_PROMPT" 1>/dev/null
cp -Rf "$SCRIPT_DIR/src/themes" "$AM_PROMPT" 1>/dev/null

for USER_ITEM in src/user/*; do
for USER_ITEM in $SCRIPT_DIR/src/user/*; do
local USER_ITEM_NAME=$(basename "$USER_ITEM")
local USER_ITEM_PATH="$AM_PROMPT/user/$USER_ITEM_NAME"

Expand Down Expand Up @@ -120,7 +120,7 @@ __am_prompt_install() {
local CURL_OPT="$CURL_OPT -H 'Authorization: token $GITHUB_TOKEN'"
fi

local PROMPT_SHA=$(cat VERSION)
local PROMPT_SHA=$(cat "$SCRIPT_DIR/VERSION")
local PROMPT_SHA_PATH=$HOME/.am/prompt/.sha

echo $PROMPT_SHA > $PROMPT_SHA_PATH
Expand Down

0 comments on commit 8f23fb3

Please sign in to comment.