postpone creation of self data dir, until compiler is checked first

master
George Danchev 12 years ago
parent ada1b1114a
commit 14a1af33f9

@ -25,22 +25,22 @@ fi
SAMPLE_CODE_DIR=codesamples
CC=g++
# check compiler
if ! which "${CC}" >/dev/null 2>&1; then
printf "\n${SELF}: Not found: ${CC}. Install ${CC}.\n"
cleanup
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 5
exit 6
else
mkdir "${GEN_DATA_DIR}"
fi
# check compiler
if ! which "${CC}" >/dev/null 2>&1; then
printf "\n${SELF}: Not found: ${CC}. Install ${CC}.\n"
cleanup
exit 6
fi
# process sample code tests
# if test -f "${SAMPLE_CODE_DIR}"/*.cpp; then
for SMPL in `ls "${SAMPLE_CODE_DIR}"/*.cpp`; do

Loading…
Cancel
Save