#!/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 cd doc make crossrefenum.pdf cd - if [[ -a crossrefenum.zip ]] ; then rm crossrefenum.zip ; fi 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 for file in crossrefenum.md crossrefenum.pdf fixes.lua LICENSE_FDL_1-3.md Makefile TEMPLATE_crossrefenum.context ; do ln -s ../../doc/$file $file done cd ../test 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 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