#!/bin/bash set -e for pkg in "$@"; do subdir=$(dirname $pkg)/ pkg=$(basename $pkg) ssh -litzks code.it-zukunft-schule.de "cd ~/git && ./setup-repository ${subdir}${pkg} '$pkg upstream project'" ssh -litzks code.it-zukunft-schule.de "cd ~/git && ./update-repository-posixacls ${subdir}${pkg}" test -d "${subdir}${pkg}" && cd "${subdir}${pkg}" echo "$pkg: MASTER BRANCH" && git push ssh://itzks@code.it-zukunft-schule.de:32032/~/git/${subdir}${pkg}.git master git branch | grep upstream &>/dev/null && echo "$pkg: RELEASE BRANCH" && git push ssh://itzks@code.it-zukunft-schule.de:32032/~/git/${subdir}${pkg}.git upstream git branch | grep pristine-tar &>/dev/null && echo "$pkg: PRISTINE-TAR" && git push ssh://itzks@code.it-zukunft-schule.de:32032/~/git/${subdir}${pkg}.git pristine-tar echo "$pkg: PUSHING TAGS" && git push --tags ssh://itzks@code.it-zukunft-schule.de:32032/~/git/${subdir}${pkg}.git cd .. done