postpone creation of self data dir, until compiler is checked first
This commit is contained in:
parent
ada1b1114a
commit
14a1af33f9
@ -25,20 +25,20 @@ fi
|
|||||||
SAMPLE_CODE_DIR=codesamples
|
SAMPLE_CODE_DIR=codesamples
|
||||||
CC=g++
|
CC=g++
|
||||||
|
|
||||||
# check data dir
|
|
||||||
if [ -d "${GEN_DATA_DIR}" ]; then
|
|
||||||
printf "\n${SELF}: directory %s exists!" ${GEN_DATA_DIR}
|
|
||||||
printf "\n${SELF}: use '${SELF} -c' to remove.\n"
|
|
||||||
exit 5
|
|
||||||
else
|
|
||||||
mkdir "${GEN_DATA_DIR}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check compiler
|
# check compiler
|
||||||
if ! which "${CC}" >/dev/null 2>&1; then
|
if ! which "${CC}" >/dev/null 2>&1; then
|
||||||
printf "\n${SELF}: Not found: ${CC}. Install ${CC}.\n"
|
printf "\n${SELF}: Not found: ${CC}. Install ${CC}.\n"
|
||||||
cleanup
|
cleanup
|
||||||
exit 6
|
exit 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check data dir
|
||||||
|
if [ -d "${GEN_DATA_DIR}" ]; then
|
||||||
|
printf "\n${SELF}: directory %s exists!" ${GEN_DATA_DIR}
|
||||||
|
printf "\n${SELF}: use '${SELF} -c' to remove.\n"
|
||||||
|
exit 6
|
||||||
|
else
|
||||||
|
mkdir "${GEN_DATA_DIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# process sample code tests
|
# process sample code tests
|
||||||
|
Loading…
Reference in New Issue
Block a user