mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 03:24:29 +05:00
fix: kiauh update check
This commit is contained in:
@@ -1,14 +1,18 @@
|
|||||||
kiauh_status(){
|
kiauh_status(){
|
||||||
cd ${HOME}/kiauh
|
cd ${HOME}/kiauh
|
||||||
git fetch --all -q
|
git fetch --all -q
|
||||||
CURR_KIAUH_BRANCH=$(git branch -a | head -1 | cut -d" " -f2)
|
if [ $(git branch -a | grep "* master" | cut -d" " -f2) ]; then
|
||||||
if [ $CURR_KIAUH_BRANCH = "master" ]; then
|
CURR_KIAUH_BRANCH="master"
|
||||||
|
elif [ $(git branch -a | grep "* dev-2.0" | cut -d" " -f2) ]; then
|
||||||
|
CURR_KIAUH_BRANCH="dev-2.0"
|
||||||
|
fi
|
||||||
|
if [ "$CURR_KIAUH_BRANCH" = "master" ]; then
|
||||||
REMOTE_KIAUH_COMMIT=$(git rev-parse --short=8 origin/master)
|
REMOTE_KIAUH_COMMIT=$(git rev-parse --short=8 origin/master)
|
||||||
LOCAL_KIAUH_COMMIT=$(git rev-parse --short=8 HEAD)
|
LOCAL_KIAUH_COMMIT=$(git rev-parse --short=8 HEAD)
|
||||||
if [ "$REMOTE_KIAUH_COMMIT" != "$LOCAL_KIAUH_COMMIT" ]; then
|
if [ "$REMOTE_KIAUH_COMMIT" != "$LOCAL_KIAUH_COMMIT" ]; then
|
||||||
KIAUH_UPDATE_AVAIL="true"
|
KIAUH_UPDATE_AVAIL="true"
|
||||||
fi
|
fi
|
||||||
elif [ $CURR_KIAUH_BRANCH = "dev-2.0" ]; then
|
elif [ "$CURR_KIAUH_BRANCH" = "dev-2.0" ]; then
|
||||||
REMOTE_KIAUH_COMMIT=$(git rev-parse --short=8 dev-2.0)
|
REMOTE_KIAUH_COMMIT=$(git rev-parse --short=8 dev-2.0)
|
||||||
LOCAL_KIAUH_COMMIT=$(git rev-parse --short=8 HEAD)
|
LOCAL_KIAUH_COMMIT=$(git rev-parse --short=8 HEAD)
|
||||||
if [ "$REMOTE_KIAUH_COMMIT" != "$LOCAL_KIAUH_COMMIT" ]; then
|
if [ "$REMOTE_KIAUH_COMMIT" != "$LOCAL_KIAUH_COMMIT" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user