Revision 24379,
641 bytes
checked in by geofft, 15 years ago
(diff) |
damove: Add a set -e
dacopy errors out if you're about to be doing it wrong, but damove doesn't
catch that error and happily proceeds to daremove your files. This is bad.
Don't do that.
|
-
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 | set -e |
---|
12 | |
---|
13 | : ${DEBATHENA_APT=/mit/debathena/apt} |
---|
14 | . $(dirname "$0")/debian-versions.sh |
---|
15 | |
---|
16 | if [ "$#" -ne 3 ]; then |
---|
17 | echo "Usage: damove NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE" >&2 |
---|
18 | exit 1 |
---|
19 | fi |
---|
20 | |
---|
21 | new_suffix="$1"; shift |
---|
22 | old_suffix="$1"; shift |
---|
23 | |
---|
24 | dacopy "$new_suffix" "$old_suffix" "$@" |
---|
25 | if [ "$new_suffix" != "$old_suffix" ]; then |
---|
26 | daremove "$old_suffix" "$@" |
---|
27 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.