diff --git a/scripts/status.sh b/scripts/status.sh index 1ab7ff1..d9ffccb 100755 --- a/scripts/status.sh +++ b/scripts/status.sh @@ -1,8 +1,8 @@ kiauh_status(){ if [ -d "${SRCDIR}/kiauh/.git" ]; then - cd ${HOME}/kiauh - git fetch -q + cd ${SRCDIR}/kiauh if git branch -a | grep "* master" -q; then + git fetch -q if [[ "$(git rev-parse --short=8 origin/master)" != "$(git rev-parse --short=8 HEAD)" ]]; then KIAUH_UPDATE_AVAIL="true" fi diff --git a/scripts/update.sh b/scripts/update.sh index 054efac..13b8142 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -1,7 +1,7 @@ update_kiauh(){ if [ "$KIAUH_UPDATE_AVAIL" = "true" ]; then status_msg "Updating KIAUH ..." - cd ${HOME}/kiauh + cd ${SRCDIR}/kiauh ### force reset kiauh before updating git reset --hard git pull && ok_msg "Update complete! Please restart KIAUH."