summaryrefslogtreecommitdiffstats
path: root/bin/git-new.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/git-new.sh')
-rwxr-xr-xbin/git-new.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/bin/git-new.sh b/bin/git-new.sh
new file mode 100755
index 0000000..e5fe8ef
--- /dev/null
+++ b/bin/git-new.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "${1}" ] || [ -z "${2}" ]
+then
+ echo "Usage: ${0} DISTRIBUTION PACKAGE"
+ exit 1
+fi
+
+CATEGORY="packages"
+
+DISTRIBUTION="${1}"
+shift 1
+
+PACKAGES="${@}"
+
+case "${DISTRIBUTION}" in
+ *-extras)
+ ORIGIN="progress-linux"
+ BRANCH="progress-linux"
+ ;;
+
+ *-backports)
+ ORIGIN="debian-backports"
+ BRANCH="progress-linux"
+ ;;
+
+ daniel*)
+ CATEGORY="users/daniel.baumann/debian/packages"
+ DISTRIBUTION=""
+ ORIGIN="debian"
+ BRANCH="debian"
+ ;;
+
+ *)
+ ORIGIN="debian"
+ BRANCH="progress-linux"
+ ;;
+esac
+
+for PACKAGE in ${PACKAGES}
+do
+ REPOSITORY="$(echo ${CATEGORY}/${DISTRIBUTION}/${PACKAGE} | sed -e 's|//|/|g')"
+
+ ssh git@git.progress-linux.org create ${REPOSITORY}
+ ssh git@git.progress-linux.org desc ${REPOSITORY} ${ORIGIN}: ${PACKAGE}
+ ssh git@git.progress-linux.org symbolic-ref ${REPOSITORY} HEAD refs/heads/${BRANCH}
+done