Prevent users to tick "Rebuild Makefile" if Makefile does not exist
For some reason, beginners tend to tick this at the first pass. Since it is hard to prevent that in Config.in, use a sanity check in jhalfs.
This commit is contained in:
parent
e3ccc2786a
commit
8b85dae454
1 changed files with 8 additions and 2 deletions
10
jhalfs
10
jhalfs
|
@ -475,10 +475,16 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
|
|||
|
||||
fi
|
||||
|
||||
# When regenerating the Makefile, we need to know also the
|
||||
# canonical book version
|
||||
# shellcheck disable=SC2034
|
||||
if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
|
||||
# Sanity check: users tend to tick "rebuild Makefile"
|
||||
# without generating one first. Check we have one:
|
||||
if [ ! -f $MKFILE ]; then
|
||||
set -e
|
||||
error_message "You cannot \"rebuild Makefile\" without first building one"
|
||||
fi
|
||||
# When regenerating the Makefile, we need to know also the
|
||||
# canonical book version
|
||||
case $PROGNAME in
|
||||
clfs* )
|
||||
VERSION=$(xmllint --noent "$BOOK/prologue/$ARCH/bookinfo.xml" 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||
|
|
Reference in a new issue