summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-05 16:13:47 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-05 16:13:47 -0500
commita8b9bef5de12273c20b183e5488b209d2cc60615 (patch)
tree3e561425808cb09f0213978e4692cfa01856559c
parentf9a97d74a5213c36bf97a03ded6ee7d4daba96d8 (diff)
downloadscripts-a8b9bef5de12273c20b183e5488b209d2cc60615.tar.gz
scripts-a8b9bef5de12273c20b183e5488b209d2cc60615.zip
Fix switch_all_submodules_to_head_and_clean script
-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