diff mbox

compat-wireless: fix fallbacks for unknown branch, remote or remote URL

Message ID 20100407220810.14021.54998.stgit@mj.roinet.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Pavel Roskin April 7, 2010, 10:08 p.m. UTC
None
diff mbox

Patch

diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 5d8068d..36cdfac 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -296,11 +296,11 @@  DIR="$PWD"
 cd $GIT_TREE
 GIT_DESCRIBE=$(git describe)
 GIT_BRANCH=$(git branch --no-color |sed -n 's/^\* //p')
-GIT_BRANCH=${GIT_BRANCH-master}
+GIT_BRANCH=${GIT_BRANCH:-master}
 GIT_REMOTE=$(git config branch.${GIT_BRANCH}.remote)
-GIT_REMOTE=${GIT_REMOTE-origin}
+GIT_REMOTE=${GIT_REMOTE:-origin}
 GIT_REMOTE_URL=$(git config remote.${GIT_REMOTE}.url)
-GIT_REMOTE_URL=${GIT_REMOTE_URL-unknown}
+GIT_REMOTE_URL=${GIT_REMOTE_URL:-unknown}
 echo -e "${GREEN}Updated${NORMAL} from local tree: ${BLUE}${GIT_TREE}${NORMAL}"
 echo -e "Origin remote URL: ${CYAN}${GIT_REMOTE_URL}${NORMAL}"
 cd $DIR