Merge branch 't/pre_scripts'
[grml-debootstrap.git] / grml-debootstrap
index 53f1e20..48f7c64 100755 (executable)
@@ -576,6 +576,10 @@ set_target_directory(){
     TUNE2FS=''
     FSCK=''
     GRUB=''
+    # make sure we normalise the path to an absolute directory name so something like:
+    #  mkdir -p foo/a bar/a; (cd foo; grml-debootstrap -t a)&; (cd bar; grml-debootstrap -t a)&; wait
+    # works
+    TARGET="$(readlink -f $TARGET)"
 }
 
 if [ -b "$TARGET" ] ; then