Author: adsb
Date: 2008-12-02 09:15:59 +0000 (Tue, 02 Dec 2008)
New Revision: 1746

Modified:
   trunk/debian/changelog
   trunk/scripts/uupdate.sh
Log:
uupdate: Use mktemp rather than hard-coding a temporary directory name.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-11-26 16:28:31 UTC (rev 1745)
+++ trunk/debian/changelog      2008-12-02 09:15:59 UTC (rev 1746)
@@ -7,6 +7,7 @@
     already installed on the system should be installed, rather than
     all packages listed in the .changes file. Thanks, Colin Watson.
     (Closes: #506663)
+  * uupdate: Use mktemp rather than hard-coding a temporary directory name.
 
   [ Christoph Berg ]
   * rmadison: Add debug.debian.net.

Modified: trunk/scripts/uupdate.sh
===================================================================
--- trunk/scripts/uupdate.sh    2008-11-26 16:28:31 UTC (rev 1745)
+++ trunk/scripts/uupdate.sh    2008-12-02 09:15:59 UTC (rev 1746)
@@ -42,7 +42,6 @@
 
 PROGNAME=`basename $0`
 MODIFIED_CONF_MSG='Default settings modified by devscripts configuration 
files:'
-TEMP_DIR="uupdate-temp.$$"
 
 usage () {
     echo \
@@ -366,8 +365,8 @@
     rm -rf $PACKAGE-$UVERSION.orig
 
     # Unpacking .orig.tar.gz is not quite trivial any longer ;-)
-    mkdir $TEMP_DIR || {
-       echo "$PROGNAME: can't create temporary directory `pwd`/$TEMP_DIR;" >&2
+    TEMP_DIR=$(mktemp -dt uupdate.XXXXXXXX) || {
+       echo "$PROGNAME: can't create temporary directory;" >&2
        echo "aborting..." >&2
        exit 1
     }
@@ -574,8 +573,8 @@
     fi
 
     cd ..
-    mkdir $TEMP_DIR || {
-       echo "$PROGNAME: can't create temporary directory `pwd`/$TEMP_DIR;" >&2
+    TEMP_DIR=$(mktemp -dt uupdate.XXXXXXXX) || {
+       echo "$PROGNAME: can't create temporary directory;" >&2
        echo "aborting..." >&2
        exit 1
     }



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to