You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
887 B
33 lines
887 B
#!/bin/bash
|
|
|
|
if [[ ! -d .git ]]; then
|
|
echo "This script can only be run from a top level git directory. Exiting..."
|
|
exit 1
|
|
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
|
|
gituser="anonymous"
|
|
fi
|
|
|
|
read -p "Enter your commit message []: " -e commitmessage
|
|
|
|
git submodule foreach "git commit -a -m \"$commitmessage\" || true"
|
|
git submodule foreach "sed -i \"s/system@scm\.trinitydesktop\.org/$gituser@scm\.trinitydesktop\.org/g\" .git/config"
|
|
git submodule foreach "git pull && git push origin master"
|
|
RETCODE=$?
|
|
if [[ $RETCODE != 0 ]]; then
|
|
echo "Something went wrong"
|
|
exit 1
|
|
fi
|
|
|
|
git commit -a -m "$commitmessage" || true
|
|
sed -i "s/system@scm\.trinitydesktop\.org/$gituser@scm\.trinitydesktop\.org/g" .git/config
|
|
git pull && git push origin master || true
|