From a8b9bef5de12273c20b183e5488b209d2cc60615 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 5 Nov 2011 16:13:47 -0500 Subject: [PATCH] Fix switch_all_submodules_to_head_and_clean script --- switch_all_submodules_to_head_and_clean | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/switch_all_submodules_to_head_and_clean b/switch_all_submodules_to_head_and_clean index 9049344..5b409b8 100755 --- a/switch_all_submodules_to_head_and_clean +++ b/switch_all_submodules_to_head_and_clean @@ -8,6 +8,8 @@ fi echo "Preparing $PWD for development use" if [[ $1 == "" ]]; then read -p "Enter your TDE GIT username []: " -e gituser +else + gituser=$1 fi if [[ $gituser == "" ]]; then @@ -25,17 +27,17 @@ git reset --hard HEAD git clean -dxf if [[ -e .gitmodules ]]; then - if [[ $1 == "anonymous" ]]; then + if [[ $gituser == "anonymous" ]]; then sed -i 's/system@//g' .gitmodules else - sed -i "s/system@/$1@/g" .gitmodules + sed -i "s/system@/$gituser@/g" .gitmodules fi git submodule init git submodule update git submodule foreach "git checkout master" git submodule foreach "git pull" - git submodule foreach "$THISSCRIPT $1" + git submodule foreach "$THISSCRIPT $gituser" git checkout -- .gitmodules fi