File: git-update-all

package info (click to toggle)
dosbox-x 2025.12.01%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,224 kB
  • sloc: cpp: 339,768; ansic: 165,257; sh: 1,455; makefile: 963; perl: 385; python: 106; asm: 57
file content (19 lines) | stat: -rwxr-xr-x 448 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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