Module: xenomai-2.5
Branch: master
Commit: 5306a346cc356d76233a4e75ad3f17c603b735f7
URL:    
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=5306a346cc356d76233a4e75ad3f17c603b735f7

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Jan  2 02:02:58 2011 +0100

prepare-kernel: fail if temporary directory already exists

---

 scripts/prepare-kernel.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 51808aa..09626eb 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -256,7 +256,10 @@ fi
 if test "x$output_patch" != "x"; then
 
     temp_tree=$TMPDIR/prepare-kernel-$$
-    mkdir $temp_tree
+    if ! mkdir $temp_tree; then
+       echo Temporary directory $temp_tree already exists, aborting.
+       exit 1
+    fi
 
     patchdir=`dirname $output_patch`
     patchdir=`cd $patchdir && pwd`


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to