[Pkg-bugzilla-commits] r66 - trunk/bugzilla-2.18/debian
Alexis Sukrieh
sukria-guest@costa.debian.org
Fri, 22 Apr 2005 10:48:05 +0000
Author: sukria-guest
Date: 2005-04-22 10:48:04 +0000 (Fri, 22 Apr 2005)
New Revision: 66
Modified:
trunk/bugzilla-2.18/debian/bugzilla.postinst
Log:
replace_file can be safely used several times for the same file
Modified: trunk/bugzilla-2.18/debian/bugzilla.postinst
===================================================================
--- trunk/bugzilla-2.18/debian/bugzilla.postinst 2005-04-22 10:42:16 UTC (rev 65)
+++ trunk/bugzilla-2.18/debian/bugzilla.postinst 2005-04-22 10:48:04 UTC (rev 66)
@@ -31,17 +31,20 @@
file_source="$1"
file_dest="$2"
-
- if [ ! -f $file_dest ]; then
- mv $file_source $file_dest || exit 10
- debug "mv $file_source $file_dest"
+ if [ ! -f $file_source ]; then
+ debug "$file_source has already been moved"
else
- cp $file_dest ${file_dest}.old
- debug "ucf --debconf-ok $file_source $file_dest"
- ucf --debconf-ok $file_source $file_dest || exit 11
+ if [ ! -f $file_dest ]; then
+ mv $file_source $file_dest || exit 10
+ debug "mv $file_source $file_dest"
+ else
+ cp $file_dest ${file_dest}.old
+ debug "ucf --debconf-ok $file_source $file_dest"
+ ucf --debconf-ok $file_source $file_dest || exit 11
+ fi
+ chown www-data:www-data $file_dest
+ #rm -f $file_source
fi
- chown www-data:www-data $file_dest
-# rm -f $file_source
}
if [ "$1" = "configure" ]; then