summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xswitch_all_submodules_to_head_and_clean8
1 files 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