improve update.sh

This commit is contained in:
genofire's bot 2020-06-16 12:34:58 +02:00
parent 396bbf89d2
commit 3f141cc6b9

View file

@ -3,8 +3,12 @@ wget -q -O plenum.md "https://md.ccc-mannheim.de/9vP-toraQhOONftDOFuQtw/download
wget -q -O p5/plenum.md "https://md.ccc-mannheim.de/oirNqftnSbK2esF9xFWvaw/download" wget -q -O p5/plenum.md "https://md.ccc-mannheim.de/oirNqftnSbK2esF9xFWvaw/download"
wget -q -O open_software.md "https://md.ccc-mannheim.de/-H4XaDXbTn-3q_ES2RTxDA/download" wget -q -O open_software.md "https://md.ccc-mannheim.de/-H4XaDXbTn-3q_ES2RTxDA/download"
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then if [[ ! -z "$(git status --porcelain --ignore-submodules -unormal)" ]]; then
echo "[bot] commit dirty changes"
git commit -m "bot update" *.md git commit -m "bot update" *.md
fi
if [[ "$(git rev-list --left-right --count HEAD...@'{u}')" != "0 0" ]]; then
echo "[bot] push commits"
git remote | xargs -L1 git push --all git remote | xargs -L1 git push --all
fi fi