diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-04-20 10:09:49 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-04-20 10:09:49 +0200 |
commit | 46867d77cb55c76c9f7d7b64dad519c5bd0393cc (patch) | |
tree | 5ebd1d528af2133545c59c67e2b0f69cd203e6fe /bin/gitcreate | |
parent | 72f682adad3b0e230fa1405cfdaf58e38302b918 (diff) | |
download | buildscripts-46867d77cb55c76c9f7d7b64dad519c5bd0393cc.tar.gz buildscripts-46867d77cb55c76c9f7d7b64dad519c5bd0393cc.tar.bz2 buildscripts-46867d77cb55c76c9f7d7b64dad519c5bd0393cc.zip |
fork X2Go buildscripts for Arctica Project
Diffstat (limited to 'bin/gitcreate')
-rwxr-xr-x | bin/gitcreate | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/bin/gitcreate b/bin/gitcreate deleted file mode 100755 index 166e091..0000000 --- a/bin/gitcreate +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -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 && _misc_/setup-repository ${subdir}${pkg} '${pkg} upstream project'" - ssh -l"${GIT_USER}" "${GIT_HOSTNAME}" "cd ~/git && _misc_/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 |