source: trunk/debathena/scripts/damove @ 23861

Revision 23861, 1.0 KB checked in by geofft, 15 years ago (diff)
fix typo in damove's protection
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3# Usage: damove NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE
4
5# Move 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 moves 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 [ "$#" -ne 3 ]; then
15    echo "Usage: damove 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 move $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"
36    if [ "$1" != "$2" ]; then
37        reprepro -Vb $DEBATHENA_APT removesrc "${code}${2}" "$3"
38    fi
39done
Note: See TracBrowser for help on using the repository browser.