[devscripts] 06/06: uupdate: Do not use /dev/tty
Osamu Aoki
osamu at moszumanska.debian.org
Wed Nov 18 13:34:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
osamu pushed a commit to branch master
in repository devscripts.
commit fe9feeffb1fdc9ddc31e94e79914c15d3115e46e
Author: Osamu Aoki <osamu at debian.org>
Date: Tue Nov 17 23:20:04 2015 +0900
uupdate: Do not use /dev/tty
Do not overwrite existing *_*.debian.tar.*
---
scripts/uupdate.sh | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/scripts/uupdate.sh b/scripts/uupdate.sh
index 2120d67..de47614 100755
--- a/scripts/uupdate.sh
+++ b/scripts/uupdate.sh
@@ -1057,8 +1057,18 @@ else
COMP=${DEBIANFILE##*.}
NEW_DEBIANFILE="${PACKAGE}_${NEW_VERSION}-$SUFFIX.debian.tar.$COMP"
fi
- cp -i $DEBIANFILE ${NEW_DEBIANFILE} 2>/dev/tty
-
+ if [ -e ${NEW_DEBIANFILE} ]; then
+ if [ "$DEBIANFILE" = "${NEW_DEBIANFILE}" ]; then
+ echo "$PROGNAME: -> Use existing ${NEW_DEBIANFILE}" >&2
+ else
+ echo "$PROGNAME: -> Overwrite to ${NEW_DEBIANFILE}" >&2
+ cp -f $DEBIANFILE ${NEW_DEBIANFILE}
+ fi
+ else
+ echo "$PROGNAME: -> Copy to ${NEW_DEBIANFILE}" >&2
+ cp $DEBIANFILE ${NEW_DEBIANFILE}
+ fi
+
# fake DSC
FAKEDSC="${PACKAGE}_${NEW_VERSION}-$SUFFIX.dsc"
echo "Format: ${FORMAT}" > "$FAKEDSC"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list