Adjusting check for target directory in live-build-cron scripts to fail if non-directories are used, thanks to Ben Armstrong <synrg@debian.org>.

This commit is contained in:
Daniel Baumann 2011-08-04 13:19:37 +02:00
parent a7a2aa23c6
commit 1deaeb04e5
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -31,7 +31,9 @@ Init ()
exit 0
fi
if [ -z "${LIVE_BUILD_CRON_MANUAL_DIRECTORY}" ]
mkdir -p "${LIVE_BUILD_CRON_MANUAL_DIRECTORY}"
if [ ! -d "${LIVE_BUILD_CRON_MANUAL_DIRECTORY}" ]
then
echo "E: live-build-cron-manual directory not set."
exit 1