source: trunk/debathena/scripts/dacopy @ 24079

Revision 24079, 946 bytes checked in by broder, 15 years ago (diff)
Add convenience repo-management scripts dacopy and daremove, and change damove to use those.
  • Property svn:executable set to *
RevLine 
[24079]1#!/bin/sh
2
3# Usage: dacopy NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE
4
5# Copy the source package from the old suffix to the new suffix, where
6# a suffix is probably one of "", "-proposed", or "-development"
7#
8# This copies any source or binary package built from the source
9# package PACKAGE
10
11: ${DEBATHENA_APT=/mit/debathena/apt}
12. $(dirname "$0")/debian-versions.sh
13
14if [ "$#" -lt 3 ]; then
15    echo "Usage: dacopy NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE" >&2
16    exit 1
17fi
18
19case "${1}/${2}" in
20  /-proposed) ;;
21  /-development) ;;
22  -proposed/-development) ;;
23  *)
24    echo "WAIT. You are about to copy $3"
25    echo "  FROM debathena$2 TO debathena$1,"
26    echo -n "which is probably backwards. Is that a good idea [yes/N]? "
27    read yn
28    if [ "$yn" != "yes" ]; then
29      echo "that's what I thought. Exiting."
30      exit 1
31    fi ;;
32esac
33
34for code in $DEBIAN_CODES; do
35    reprepro -Vb $DEBATHENA_APT copysrc "${code}${1}" "${code}${2}" "$3"
36done
Note: See TracBrowser for help on using the repository browser.