From: Peter Palfrader Date: Sat, 8 Dec 2012 17:49:19 +0000 (+0100) Subject: Create target if it does not exist, II X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=03836126a6cc44a6d6890879c20b7d4e07b1c838;p=mirror%2Fdsa-puppet.git Create target if it does not exist, II --- diff --git a/modules/roles/files/static-mirroring/static-master-update-component b/modules/roles/files/static-mirroring/static-master-update-component index d9dae27c8..197044f7c 100755 --- a/modules/roles/files/static-mirroring/static-master-update-component +++ b/modules/roles/files/static-mirroring/static-master-update-component @@ -84,6 +84,10 @@ if [ -z "$srchost" ] || [ -z "$srcdir" ]; then exit 1 fi tgt="$base/$component" +if ! [ -d "$tgt" ]; then + echo "$0: Creating $tgt for $component"; + mkdir "$tgt" +fi if [ "$srchost" = "`hostname -f`" ]; then src="$srcdir"