dosbox-x/git-update-all
Robert de Rooy 694cc766a4 Cleanup Bash scripts.
This makes them pass shellcheck. Except for a few unused
export warnings.

I also wonder if the majority of these files should be
in the root of the project, or should be moved to "build-scripts"
(or should still even exist).

a few minor changes

one more minor changes
2023-04-15 15:53:08 +02:00

20 lines
448 B
Bash
Executable File

#!/usr/bin/env bash
# sort of like svn-update-all
curbranch=$(git branch | grep '^\*' | sed -e 's/^\* //')
if [[ "${curbranch}" == "" ]]; 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