made the mcd function create parent directories if they're missing.
authorChris Koeritz <fred@gruntose.com>
Sat, 21 Jan 2012 15:06:05 +0000 (10:06 -0500)
committerChris Koeritz <fred@gruntose.com>
Sat, 21 Jan 2012 15:06:05 +0000 (10:06 -0500)
scripts/core/functions.sh

index 388aa4127f0cd633e8b6ea5b48e6b690c0261ac6..bf92a58d15f6f231c4e7bce8e5928ce87cda27cd 100644 (file)
@@ -18,7 +18,7 @@ function chowngrp {
 # makes a directory of the name specified and then tries to change the
 # current directory to that directory.
 function mcd {
-  if [ ! -d "$1" ]; then mkdir "$1"; fi
+  if [ ! -d "$1" ]; then mkdir -p "$1"; fi
   cd "$1"
 }