From 03836126a6cc44a6d6890879c20b7d4e07b1c838 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 8 Dec 2012 18:49:19 +0100 Subject: [PATCH] Create target if it does not exist, II --- .../files/static-mirroring/static-master-update-component | 4 ++++ 1 file changed, 4 insertions(+) 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" -- 2.20.1