dosbox-x/git-update-all
Jookia b3fa848f0f Replace '/bin/bash' with '/usr/bin/env bash' in shebangs
This should hopefully help portability with BSDs.
2022-12-12 17:52:27 +08:00

20 lines
437 B
Bash
Executable File

#!/usr/bin/env bash
# sort of like svn-update-all
curbranch=`git branch | grep '^\*' | sed -e 's/^\* //'`
if [[ x"$curbranch" == x"" ]]; then
echo Unable to determine current branch
exit 1
fi
make clean 2>/dev/null
make distclean 2>/dev/null
./cleantree 2>/dev/null
for i in \* \*/\* \*/\*/\*; do git add $i 2>/dev/null; done
git commit -a
./cleantree 2>/dev/null
git push origin "$curbranch"
git pull origin "$curbranch"
git fetch