Skip to content
Snippets Groups Projects
Commit 86469f18 authored by Tomas Lovato's avatar Tomas Lovato
Browse files

add clean option in the script to remove previous builds

parent a8443f39
No related branches found
No related tags found
1 merge request!1Import manuals v4.2
......@@ -30,6 +30,8 @@ To generate the PDF version of manual(s) use the following:
Optional commands :
`-c` Clean up previous builds of the manual(s)
`-p` Produce manual with figures and disable draft watermark
`-r` Specify the release version number of the manual(s) instead of the branch name
......
......@@ -5,30 +5,33 @@
manuals='NEMO SI3 TOP'
# Initialization of the options
x_p='' ; x_r=''
x_c='' ; x_p='' ; x_r=''
# Choice of the options ---
while getopts hpr: option; do
while getopts chpr: option; do
case $option in
('h') cat <<EOF
Usage:
------
./manual_build.sh [-p] [-r version ] manual
./manual_build.sh [-c] [-p] [-r version ] manual
Mandatory
Chose one model manual among ${manuals} or all (if not provided compile "NEMO")
Optional
-c Clean up previous builds of the manual(s)
-p Produce manual with figures and disable draft watermark
-r Specify the release version number of the manual(s) instead of the branch name
EOF
exit 0 ;;
('c') x_c=0 ;;
('p') x_p=0 ;;
('r') x_r=${OPTARG} ;;
esac
done
shift $(( $OPTIND - 1 ));
VER_NUM=${x_r}
CLEAN=${x_c}
DRAFT=${x_p}
VER_NUM=${x_r}
CMP_NAM=$1
## Initialisation
......@@ -101,7 +104,7 @@ echo "Fontawesome path is $fontawesome \n"
for model in $models; do
echo "Start compiling manual for $model"
# clean $model
if [ "x${CLEAN}" != 'x' ] ; then clean $model ; fi
build $model
printf "\t¤ End of building run\n"
echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment