r42748 - /scripts/rm-pkg-from-repo
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Tue Aug 25 16:12:12 UTC 2009
Author: gregoa
Date: Tue Aug 25 16:11:58 2009
New Revision: 42748
URL: http://svn.debian.org/wsvn/?sc=1&rev=42748
Log:
first draft of rm-pkg-from-repo
Added:
scripts/rm-pkg-from-repo (with props)
Added: scripts/rm-pkg-from-repo
URL: http://svn.debian.org/wsvn/scripts/rm-pkg-from-repo?rev=42748&op=file
==============================================================================
--- scripts/rm-pkg-from-repo (added)
+++ scripts/rm-pkg-from-repo Tue Aug 25 16:11:58 2009
@@ -1,0 +1,58 @@
+#!/bin/sh
+
+# Copyright: 2009, gregor herrmann <gregoa at debian.org>
+# License: same as Perl (i.e. Artistic | GPL-1+)
+
+PKG="$1"
+REPO="${2:-svn+ssh://svn.debian.org/svn/pkg-perl}"
+
+warn() {
+ echo "$1" 1>&2
+}
+
+die() {
+ warn "$1"
+ exit 1
+}
+
+[ -n "$PKG" ] || die "$(basename $0) PACKAGE [ REPO ]"
+
+# try to find "real" paths
+for DIR in "./trunk/$PKG" "./$PKG" "."; do
+ if [ -d "$DIR" -a -d "$DIR/.svn" ]; then
+ if [ "$(basename $(readlink -f "$DIR"))" == "$PKG" ] ; then
+ WC="$DIR"
+ break
+ fi
+ fi
+done
+
+if [ -n "$WC" ] ; then
+ cd "$WC"
+ TRUNK=$(svnpath)
+ TAGS=$(svnpath tags)
+ UPSTREAM=$(svnpath branches/upstream)
+else
+ warn "No working copy for $PKG found, guessing ..."
+fi
+
+# no working copy found or svnpath failed
+TRUNK="${TRUNK:-$REPO/trunk/$PKG}"
+UPSTREAM="${UPSTREAM:-$REPO/brances/upstream/$PKG}"
+TAGS="${TAGS:-$REPO/tags/$PKG}"
+
+echo "The following directories will be deleted from $REPO:"
+echo "$TRUNK"
+echo "$UPSTREAM"
+echo "$TAGS"
+
+read -p "Delete (y|N)? " DELETE
+case "$DELETE" in
+ y|Y)
+ svn rm "$TRUNK" "$UPSTREAM" "$TAGS" -m "Removing $PKG from repository."
+ ;;
+ *)
+ ;;
+esac
+
+
Propchange: scripts/rm-pkg-from-repo
------------------------------------------------------------------------------
svn:executable = *
More information about the Pkg-perl-cvs-commits
mailing list