source: trunk/debathena/scripts/dacopy @ 24565

Revision 24565, 891 bytes checked in by broder, 12 years ago (diff)
Add a dareprepro script. Since there are a handful of arguments that we *always* pass to reprepro, add a wrapper for reprepro that passes them for us.
  • 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
18case "${1}/${2}" in
19  /-proposed) ;;
20  /-development) ;;
21  -proposed/-development) ;;
22  *)
23    echo "WAIT. You are about to copy $3"
24    echo "  FROM debathena$2 TO debathena$1,"
25    echo -n "which is probably backwards. Is that a good idea [yes/N]? "
26    read yn
27    if [ "$yn" != "yes" ]; then
28      echo "that's what I thought. Exiting."
29      exit 1
30    fi ;;
31esac
32
33for code in $DEBIAN_CODES; do
34    dareprepro copysrc "${code}${1}" "${code}${2}" "$3"
35done
Note: See TracBrowser for help on using the repository browser.