]> Dogcows Code - chaz/tar/commitdiff
(symlink_to_gnulib): Make sure the target directory exists and create it if it does...
authorSergey Poznyakoff <gray@gnu.org.ua>
Sun, 12 Aug 2007 08:25:27 +0000 (08:25 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 12 Aug 2007 08:25:27 +0000 (08:25 +0000)
bootstrap

index 6d9ac6728374051a43874b33c5b71b9087cd8270..4c7d9e637c57913216ddc24ab15aed972d338695 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -372,6 +372,12 @@ esac
 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
 <$gnulib_tool || exit
 
+ensure_dir_exists()
+{
+  d=`dirname $dst`
+  test -d "$d" || mkdir -p -- "$d"
+}
+
 symlink_to_gnulib()
 {
   src=$GNULIB_SRCDIR/$1
@@ -388,6 +394,7 @@ symlink_to_gnulib()
       test -f "$dst" &&
       cmp -s "$src" "$dst" || {
        echo "$0: cp -fp $src $dst" &&
+       ensure_dir_exists $dst &&
        cp -fp "$src" "$dst"
       }
     else
@@ -410,6 +417,7 @@ symlink_to_gnulib()
        esac
 
        echo "$0: ln -fs $dot_dots$src $dst" &&
+       ensure_dir_exists $dst &&
        ln -fs "$dot_dots$src" "$dst"
       }
     fi
This page took 0.026447 seconds and 4 git commands to generate.