source: trunk/debathena/scripts/dacopy @ 25562

Revision 25562, 1.0 KB checked in by jdreed, 12 years ago (diff)
Support -bleeding repository
  • Property svn:executable set to *
Line 
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. $(dirname "$0")/debian-versions.sh
12
13if [ "$#" -lt 3 ]; then
14    echo "Usage: dacopy NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE" >&2
15    exit 1
16fi
17
18if [ "$1" = "-bleeding" ] || [ "$2" = "-bleeding" ]; then
19    echo "You're not supposed to move or copy things to or from -bleeding."
20    echo "Exiting..."
21    exit 1
22fi
23
24
25case "${1}/${2}" in
26  /-proposed) ;;
27  /-development) ;;
28  -proposed/-development) ;;
29  *)
30    echo "WAIT. You are about to copy $3"
31    echo "  FROM debathena$2 TO debathena$1,"
32    echo -n "which is probably backwards. Is that a good idea [yes/N]? "
33    read yn
34    if [ "$yn" != "yes" ]; then
35      echo "that's what I thought. Exiting."
36      exit 1
37    fi ;;
38esac
39
40for code in $DEBIAN_CODES; do
41    dareprepro copysrc "${code}${1}" "${code}${2}" "$3"
42done
Note: See TracBrowser for help on using the repository browser.