Revision 25868,
1.3 KB
checked in by jdreed, 12 years ago
(diff) |
* Allow moving to/from bleeding with warnings.
|
-
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 | : ${DA_SCRIPTS_DIR="$(dirname "$0")"} |
---|
12 | . "$DA_SCRIPTS_DIR"/debian-versions.sh |
---|
13 | |
---|
14 | if [ "$#" -lt 3 ]; then |
---|
15 | echo "Usage: dacopy NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE" >&2 |
---|
16 | exit 1 |
---|
17 | fi |
---|
18 | |
---|
19 | if [ "$1" = "-bleeding" ] || [ "$2" = "-bleeding" ]; then |
---|
20 | echo "You're not supposed to move or copy things to or from -bleeding." |
---|
21 | if [ "${DA_SHOOT_SELF_IN_FOOT:-x}" != "yesplease" ]; then |
---|
22 | echo "Exiting..." |
---|
23 | exit 1 |
---|
24 | fi |
---|
25 | echo -n "This is a terrible idea. Type 'y' to continue anyway: " |
---|
26 | read answer |
---|
27 | if [ "$answer" != "y" ]; then |
---|
28 | echo "You have chosen wisely." |
---|
29 | exit 1 |
---|
30 | fi |
---|
31 | fi |
---|
32 | |
---|
33 | |
---|
34 | case "${1}/${2}" in |
---|
35 | /-proposed) ;; |
---|
36 | /-development) ;; |
---|
37 | -proposed/-development) ;; |
---|
38 | *) |
---|
39 | echo "WAIT. You are about to copy $3" |
---|
40 | echo " FROM debathena$2 TO debathena$1," |
---|
41 | echo -n "which is probably backwards. Is that a good idea [yes/N]? " |
---|
42 | read yn |
---|
43 | if [ "$yn" != "yes" ]; then |
---|
44 | echo "that's what I thought. Exiting." |
---|
45 | exit 1 |
---|
46 | fi ;; |
---|
47 | esac |
---|
48 | |
---|
49 | for code in $DEBIAN_CODES; do |
---|
50 | dareprepro copysrc "${code}${1}" "${code}${2}" "$3" |
---|
51 | done |
---|
Note: See
TracBrowser
for help on using the repository browser.