This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from 29d243a [TESTCOMMIT] bin/gitcreate: remove trainling whitespace. new df2ad29 bin/gitcreate: use more quotes, curly braces and $(). Fix erratic jumping out of cwd. Require the new git directory to already be in cwd, or it being the cwd for successful creation. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/gitcreate | 58 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 20 deletions(-) -- Alioth's /srv/git/code.x2go.org/buildscripts.git//../..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit df2ad298382c1c904a9e9f419485862cbd10c67e Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Feb 24 01:49:31 2015 +0100 bin/gitcreate: use more quotes, curly braces and $(). Fix erratic jumping out of cwd. Require the new git directory to already be in cwd, or it being the cwd for successful creation. --- bin/gitcreate | 58 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/bin/gitcreate b/bin/gitcreate index c4b8230..07528c3 100755 --- a/bin/gitcreate +++ b/bin/gitcreate @@ -2,24 +2,42 @@ set -xe -GIT_USER= -GIT_HOSTNAME= -GIT_SSH_PORT=22 - -PREFIX=$(echo `basename $0` | cut -d"-" -f1) -. ~/.buildscripts/$PREFIX.conf - -for pkg in "$@"; do - subdir=$(dirname $pkg)/ - pkg=$(basename $pkg) - ssh -l$GIT_USER $GIT_HOSTNAME "cd ~/git && ./setup-repository ${subdir}${pkg} '$pkg upstream project'" - ssh -l$GIT_USER $GIT_HOSTNAME "cd ~/git && ./update-repository-posixacls ${subdir}${pkg}" - test -d "$pkg" && cd "$pkg" - echo "$pkg: MASTER BRANCH" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} master - git branch | grep upstream &>/dev/null && echo "$pkg: RELEASE BRANCH" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} upstream - git branch | grep pristine-tar &>/dev/null && echo "$pkg: PRISTINE-TAR" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} pristine-tar - echo "$pkg: PUSHING TAGS" && git push --tags ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} - git remote | grep origin >/dev/null || git remote add origin ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} - git remote add ${PREFIX}-public ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} - cd .. +GIT_USER="" +GIT_HOSTNAME="" +GIT_SSH_PORT="22" + +PREFIX="$(echo $(basename "${0}") | cut -d"-" -f1)" +. ~/.buildscripts/"${PREFIX}.conf" + +for pkg in "${@}"; do + subdir="$(dirname ${pkg})/" + pkg="$(basename ${pkg})" + + ssh -l"${GIT_USER}" "${GIT_HOSTNAME}" "cd ~/git && ./setup-repository ${subdir}${pkg} '${pkg} upstream project'" + ssh -l"${GIT_USER}" "${GIT_HOSTNAME}" "cd ~/git && ./update-repository-posixacls ${subdir}${pkg}" + + POP="0" + if [ -d "${pkg}" ]; then + pushd "${pkg}" + POP="1" + else + # Use some heuristics to find out if we're already in the directory. + # The current working dir must begin with the string given as parameter. + # Suffixes like .git, -git or the like can be used without making this check fail. + CUR_DIR="$(basename "$(pwd)")" + CUR_DIR="${CUR_DIR:0:${#pkg}}" + if [ "${CUR_DIR}" != "${pkg}" ]; then + echo "Package '${pkg}' does not exist!" >&2 + exit 1 + fi + fi + + echo "${pkg}: MASTER BRANCH" && git push "ssh://${GIT_USER}@${GIT_HOSTNAME}:${GIT_SSH_PORT}/~/git/${subdir}${pkg}" master + git branch | grep upstream &>/dev/null && echo "${pkg}: RELEASE BRANCH" && git push "ssh://${GIT_USER}@${GIT_HOSTNAME}:${GIT_SSH_PORT}/~/git/${subdir}${pkg}" upstream + git branch | grep pristine-tar &>/dev/null && echo "${pkg}: PRISTINE-TAR" && git push "ssh://${GIT_USER}@${GIT_HOSTNAME}:${GIT_SSH_PORT}/~/git/${subdir}${pkg}" pristine-tar + echo "${pkg}: PUSHING TAGS" && git push --tags "ssh://${GIT_USER}@${GIT_HOSTNAME}:${GIT_SSH_PORT}/~/git/${subdir}${pkg}" + git remote | grep origin >/dev/null || git remote add origin "ssh://${GIT_USER}@${GIT_HOSTNAME}:${GIT_SSH_PORT}/~/git/${subdir}${pkg}" + git remote add "${PREFIX}-public" "ssh://${GIT_USER}@${GIT_HOSTNAME}:${GIT_SSH_PORT}/~/git/${subdir}${pkg}" + + [ "${POP}" = "1" ] && popd done -- Alioth's /srv/git/code.x2go.org/buildscripts.git//../..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git