Revision 23861,
1.0 KB
checked in by geofft, 15 years ago
(diff) |
fix typo in damove's protection
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[23555] | 1 | #!/bin/sh |
---|
| 2 | |
---|
[23837] | 3 | # Usage: damove NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE |
---|
[23555] | 4 | |
---|
| 5 | # Move the source package from the old suffix to the new suffix, where |
---|
[23837] | 6 | # a suffix is probably one of "", "-proposed", or "-development" |
---|
[23555] | 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 | |
---|
[23837] | 14 | if [ "$#" -ne 3 ]; then |
---|
| 15 | echo "Usage: damove NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE" >&2 |
---|
[23555] | 16 | exit 1 |
---|
| 17 | fi |
---|
| 18 | |
---|
[23837] | 19 | case "${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." |
---|
[23861] | 30 | exit 1 |
---|
[23837] | 31 | fi ;; |
---|
| 32 | esac |
---|
| 33 | |
---|
[23555] | 34 | for code in $DEBIAN_CODES; do |
---|
| 35 | reprepro -Vb $DEBATHENA_APT copysrc "${code}${1}" "${code}${2}" "$3" |
---|
[23837] | 36 | if [ "$1" != "$2" ]; then |
---|
| 37 | reprepro -Vb $DEBATHENA_APT removesrc "${code}${2}" "$3" |
---|
| 38 | fi |
---|
[23555] | 39 | done |
---|
Note: See
TracBrowser
for help on using the repository browser.