Fix switch_all_submodules_to_head_and_clean script

pull/1/head
Timothy Pearson 14 years ago
parent f9a97d74a5
commit a8b9bef5de

@ -8,6 +8,8 @@ fi
echo "Preparing $PWD for development use" echo "Preparing $PWD for development use"
if [[ $1 == "" ]]; then if [[ $1 == "" ]]; then
read -p "Enter your TDE GIT username []: " -e gituser read -p "Enter your TDE GIT username []: " -e gituser
else
gituser=$1
fi fi
if [[ $gituser == "" ]]; then if [[ $gituser == "" ]]; then
@ -25,17 +27,17 @@ git reset --hard HEAD
git clean -dxf git clean -dxf
if [[ -e .gitmodules ]]; then if [[ -e .gitmodules ]]; then
if [[ $1 == "anonymous" ]]; then if [[ $gituser == "anonymous" ]]; then
sed -i 's/system@//g' .gitmodules sed -i 's/system@//g' .gitmodules
else else
sed -i "s/system@/$1@/g" .gitmodules sed -i "s/system@/$gituser@/g" .gitmodules
fi fi
git submodule init git submodule init
git submodule update git submodule update
git submodule foreach "git checkout master" git submodule foreach "git checkout master"
git submodule foreach "git pull" git submodule foreach "git pull"
git submodule foreach "$THISSCRIPT $1" git submodule foreach "$THISSCRIPT $gituser"
git checkout -- .gitmodules git checkout -- .gitmodules
fi fi

Loading…
Cancel
Save