From 1deaeb04e59c4afd76d69b53d4e9ffc2a9a7b930 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 4 Aug 2011 13:19:37 +0200 Subject: Adjusting check for target directory in live-build-cron scripts to fail if non-directories are used, thanks to Ben Armstrong . --- cron/live-build-cron-images | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cron/live-build-cron-images') diff --git a/cron/live-build-cron-images b/cron/live-build-cron-images index c76d96ed9..334d039f6 100755 --- a/cron/live-build-cron-images +++ b/cron/live-build-cron-images @@ -30,8 +30,11 @@ Init () exit 0 fi - if [ -z "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}" ] + mkdir -p "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}" + + if [ ! -d "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}" ] then + echo "E: live-build-cron-images directory not set." exit 1 fi -- cgit v1.2.3