Print error message when OSC_DIR is not set

This commit is contained in:
Martchus 2021-09-11 20:09:47 +02:00
parent dc65cf32ad
commit 615f4dd76f
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,11 @@ set -e # abort on first error
shopt -s nullglob
source "$(dirname $0)/../versions.sh"
if ! [[ -d $OSC_DIR ]]; then
echo "\$OSC_DIR is set to \"$OSC_DIR\" which is not a directory."
exit 1
fi
for spec_file in "$OSC_DIR"/*/*/*.spec; do
trimmed_path=${spec_file#$OSC_DIR/*/*/}
project_name=${trimmed_path%*.spec}