home · contact · privacy
Make add_dir.sh more tolerant of pre-existing installations.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 18 Jan 2017 23:51:53 +0000 (00:51 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 18 Jan 2017 23:51:53 +0000 (00:51 +0100)
add_dir.sh

index 36bcf665d47af61e6ed8f6653732489613a06bc6..b8e04bd9a9c3d6b5d124fb1f8182ee2e80a382a4 100755 (executable)
@@ -13,7 +13,7 @@ link_files_in_dir () {
         [ $(basename "$file") != "." ] && \
         [ $(basename "$file") != ".." ]; then
       dir=$(basename "$file")
         [ $(basename "$file") != "." ] && \
         [ $(basename "$file") != ".." ]; then
       dir=$(basename "$file")
-      mkdir "$dir"
+      mkdir -p "$dir"
       cd "$dir"
         link_files_in_dir "$srcdir/$dir"
       cd ..
       cd "$dir"
         link_files_in_dir "$srcdir/$dir"
       cd ..