[Debian-live-changes] r1121 - configs/daniel/config/chroot_localincludes/usr/local/bin

Daniel Baumann daniel at alioth.debian.org
Sun Apr 22 08:44:48 UTC 2007


Author: daniel
Date: 2007-04-22 08:44:47 +0000 (Sun, 22 Apr 2007)
New Revision: 1121

Added:
   configs/daniel/config/chroot_localincludes/usr/local/bin/dput-upload
Log:


Added: configs/daniel/config/chroot_localincludes/usr/local/bin/dput-upload
===================================================================
--- configs/daniel/config/chroot_localincludes/usr/local/bin/dput-upload	2007-04-22 08:37:52 UTC (rev 1120)
+++ configs/daniel/config/chroot_localincludes/usr/local/bin/dput-upload	2007-04-22 08:44:47 UTC (rev 1121)
@@ -0,0 +1,121 @@
+#!/bin/sh
+
+# dput-upload.sh - package upload tool for Debian
+#
+# This script is written by Daniel Baumann <daniel at debian.org>
+# and hereby placed in the public domain (no rights reserved).
+
+set -e
+
+CODENAME_OLDSTABLE="sarge"
+CODENAME_OLDSTABLE_BACKPORTS="sarge"
+CODENAME_STABLE="etch"
+CODENAME_STABLE_BACKPORTS="etch"
+CODENAME_TESTING="lenny"
+CODENAME_UNSTABLE="sid"
+
+DIRECTORY_CHROOT="/mnt/debian"
+
+DISTRIBUTION="${1}"
+SPONSOR="${2}"
+USER="user"
+
+# Check configuration
+if [ ! -r ~/.dput.cf ]
+then
+echo >> ~/.dput.cf << EOF
+[backports]
+fqdn = www.backports.org
+incoming = /
+method = ftp
+login = anonymous
+
+[security-master]
+fqdn = security-master.debian.org
+incoming = /pub/SecurityUploadQueue/
+method = ftp
+login = anonymous
+EOF
+exit 0
+fi
+
+if [ -z "${DISTRIBUTION}" ]
+then
+	DISTRIBUTION="unstable"
+fi
+
+case "${DISTRIBUTION}" in
+	oldstable-backports|"${CODENAME_OLDSTABLE}"-backports)
+		DISTRIBUTION="oldstable-backports"
+		;;
+
+	stable-backports|"${CODENAME_STABLE}"-backports)
+		DISTRIBUTION="stable-backports"
+		;;
+
+	stable-security|"${CODENAME_STABLE}"-security)
+		DISTRIBUTION="stable-security"
+		;;
+
+	stable|"${CODENAME_STABLE}")
+		DISTRIBUTION="stable"
+		;;
+
+	testing|"${CODENAME_TESTING}")
+		DISTRIBUTION="testing"
+		;;
+
+	unstable|"${CODENAME_UNSTBALE}")
+		DISTRIBUTION="unstable"
+		;;
+esac
+
+if [ "${SPONSOR}" = "sponsor" ]
+then
+	CHROOT="${DIRECTORY_CHROOT}/${DISTRIBUTION}/home/${USER}/NEW"
+else
+	CHROOT="${DIRECTORY_CHROOT}/${DISTRIBUTION}/home/${USER}"
+fi
+
+PACKAGE="`basename ${CHROOT}/*.dsc | awk -F_ '{ print $1 }'`"
+VERSION="`basename ${CHROOT}/*.dsc | awk -F_ '{ print $2 }' | sed -e 's/.dsc//'`"
+#NAME FIXME
+
+mkdir -p "${PACKAGE}"/"${VERSION}"
+cd "${PACKAGE}"/"${VERSION}"
+mv "${CHROOT}"/* ./
+md5sums
+
+case "${DISTRIBUTION}" in
+	oldstable-backports|stable-backports)
+		dput backports *.changes
+		;;
+
+	stable-security)
+		dput security-master *.changes
+		;;
+
+	*)
+		dput ftp-master *.changes
+		;;
+esac
+
+rm -f *.upload
+chmod 0640 *.changes
+
+TARBALL="`ls *.tar.gz`"
+
+if [ -f ../upstream/"${TARBALL}" ]
+then
+	rm -f "${TARBALL}"
+	ln -s ../upstream/"${TARBALL}" ./
+else
+	if [ ! -d ../upstream ]
+	then
+		mkdir ../upstream
+	fi
+
+	mv "${TARBALL}" ../upstream
+	ln -s ../upstream/"${TARBALL}" ./
+	cd ../upstream && md5sums
+fi


Property changes on: configs/daniel/config/chroot_localincludes/usr/local/bin/dput-upload
___________________________________________________________________
Name: svn:executable
   + *




More information about the Debian-live-changes mailing list