check for extraction dir existence
This commit is contained in:
parent
2e4eef6811
commit
777afbc97a
@ -97,7 +97,7 @@ RES="${RELENG_IMG}.iso ${RELENG_IMG}.new ${RELENG_IMG}.md5 ${RELENG_IMG}.jigdo $
|
|||||||
if ! "${RELENG_XORRISO}" -version | grep libjte >/dev/null 2>&1; then
|
if ! "${RELENG_XORRISO}" -version | grep libjte >/dev/null 2>&1; then
|
||||||
printf "\n${SELF}: JTE not supported with this xorriso build. Install jigit and rebuild."
|
printf "\n${SELF}: JTE not supported with this xorriso build. Install jigit and rebuild."
|
||||||
printf "\n${SELF}: See http://www.einval.com/~steve/software/JTE/\n"
|
printf "\n${SELF}: See http://www.einval.com/~steve/software/JTE/\n"
|
||||||
exit 10
|
exit 9
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remove cruft from previous runs
|
# remove cruft from previous runs
|
||||||
@ -123,9 +123,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check for extraction directory existence
|
# check for extraction directory existence
|
||||||
if [ ! -d "${IMG_EXTRACT_DIR}" ]; then
|
if [ -d "${IMG_EXTRACT_DIR}" ]; then
|
||||||
|
printf "\n${SELF}: Found ${IMG_EXTRACT_DIR}. Please cleanup.\n"
|
||||||
|
exit 11
|
||||||
|
else
|
||||||
mkdir "${IMG_EXTRACT_DIR}"
|
mkdir "${IMG_EXTRACT_DIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# extract image content
|
# extract image content
|
||||||
set +e
|
set +e
|
||||||
"${RELENG_XORRISO}" -indev "${TMP_DATA_DIR}"/"${REMOTE_IMG}" \
|
"${RELENG_XORRISO}" -indev "${TMP_DATA_DIR}"/"${REMOTE_IMG}" \
|
||||||
@ -164,7 +168,7 @@ CMD+="\
|
|||||||
"
|
"
|
||||||
else
|
else
|
||||||
printf "\n${SELF}: FAIL to compose the boot section.\n"
|
printf "\n${SELF}: FAIL to compose the boot section.\n"
|
||||||
exit 10
|
exit 12
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# JIGDO section
|
# JIGDO section
|
||||||
@ -182,7 +186,7 @@ if which jigdo-gen-md5-list >/dev/null 2>&1; then
|
|||||||
else
|
else
|
||||||
printf "\n${SELF}: Not found: jigdo-gen-md5-list. Install jigit."
|
printf "\n${SELF}: Not found: jigdo-gen-md5-list. Install jigit."
|
||||||
printf "\n${SELF}: See http://www.einval.com/~steve/software/JTE/\n"
|
printf "\n${SELF}: See http://www.einval.com/~steve/software/JTE/\n"
|
||||||
exit 11
|
exit 13
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CMD+="\
|
CMD+="\
|
||||||
@ -214,7 +218,7 @@ if which jigit-mkimage >/dev/null 2>&1; then
|
|||||||
else
|
else
|
||||||
printf "\n${SELF}: Not found: jigit-mkimage. Install jigit."
|
printf "\n${SELF}: Not found: jigit-mkimage. Install jigit."
|
||||||
printf "\n${SELF}: See http://www.einval.com/~steve/software/JTE/\n"
|
printf "\n${SELF}: See http://www.einval.com/~steve/software/JTE/\n"
|
||||||
exit 12
|
exit 14
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# trap the exit code of diff and let the Universe explode
|
# trap the exit code of diff and let the Universe explode
|
||||||
@ -233,7 +237,7 @@ esac
|
|||||||
if [ ${KEEP} -eq 0 ]; then
|
if [ ${KEEP} -eq 0 ]; then
|
||||||
# safety net, just in case -> we want to be in the starting
|
# safety net, just in case -> we want to be in the starting
|
||||||
# directory before removing whatever self-generated stuff
|
# directory before removing whatever self-generated stuff
|
||||||
cd "${START_DIR_DONT_CHANGE}" || exit 13
|
cd "${START_DIR_DONT_CHANGE}" || exit 15
|
||||||
rm -rf ${GEN_DATA_DIR}
|
rm -rf ${GEN_DATA_DIR}
|
||||||
printf "${SELF}: removed %s\n" ${GEN_DATA_DIR}
|
printf "${SELF}: removed %s\n" ${GEN_DATA_DIR}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user