2022-11-13 18:32:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
EDIT_CMD="/usr/bin/emacs -Q -nw"
|
|
|
|
|
|
|
|
check_files(){
|
|
|
|
read -n 1 -p 'Do you want to check that you updated the changelog and the version strings? [y/n] ' rep
|
|
|
|
if [[ "$rep" == y ]] ; then
|
|
|
|
$EDIT_CMD CHANGELOG.md
|
|
|
|
$EDIT_CMD README.md
|
|
|
|
$EDIT_CMD doc/crossrefenum.md
|
|
|
|
$EDIT_CMD tex/crossrefenum.tex
|
|
|
|
$EDIT_CMD tex/t-crossrefenum.tex
|
|
|
|
elif [[ "$rep" != n ]] ; then
|
|
|
|
echo -e "\nPlease type y or n."
|
|
|
|
check_files
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
check_files
|
|
|
|
|
2023-02-20 20:06:42 +00:00
|
|
|
cd doc
|
|
|
|
make crossrefenum.pdf
|
2023-02-20 20:35:57 +00:00
|
|
|
if [[ $? != 0 ]] ; then cd - ; exit 1 ; fi
|
2023-02-20 20:06:42 +00:00
|
|
|
cd -
|
|
|
|
|
2022-11-13 20:13:54 +00:00
|
|
|
if [[ -a crossrefenum.zip ]] ; then rm crossrefenum.zip ; fi
|
2022-11-13 18:32:36 +00:00
|
|
|
mkdir crossrefenum
|
|
|
|
cd crossrefenum
|
|
|
|
for file in README.md CHANGELOG.md LICENSE.txt ; do
|
|
|
|
ln -s ../$file $file
|
|
|
|
done
|
|
|
|
mkdir doc test tex
|
|
|
|
|
|
|
|
cd doc
|
2022-11-13 20:13:54 +00:00
|
|
|
for file in crossrefenum.md crossrefenum.pdf fixes.lua LICENSE_FDL_1-3.md Makefile TEMPLATE_crossrefenum.context ; do
|
2022-11-13 18:32:36 +00:00
|
|
|
ln -s ../../doc/$file $file
|
|
|
|
done
|
|
|
|
|
|
|
|
cd ../test
|
2022-11-13 20:13:54 +00:00
|
|
|
for file in config-crossrefenum.tex config-formats.tex data-common.tex data-lines.tex data-reledmac.tex format-specific-defs.tex main-test_context.pdf main-test_latex.pdf main-test.tex Makefile validated-output ; do
|
2022-11-13 18:32:36 +00:00
|
|
|
ln -s ../../test/$file $file
|
|
|
|
done
|
|
|
|
|
|
|
|
cd ../tex
|
|
|
|
for file in crossrefenum.sty crossrefenum.tex t-crossrefenum.tex ; do
|
|
|
|
ln -s ../../tex/$file $file
|
|
|
|
done
|
|
|
|
|
|
|
|
cd ../..
|
|
|
|
7z a -l crossrefenum.zip crossrefenum
|
|
|
|
rm -r --interactive=never crossrefenum
|