enhanced path check in build script
parent
1ac4d7a596
commit
beb481d2a7
20
build.sh
20
build.sh
|
@ -128,10 +128,24 @@ sedi () {
|
|||
## -- commands
|
||||
|
||||
check_path() {
|
||||
if [ ! -d ../tikz-trackschematic ]; then
|
||||
echo "${RED}Please run this script from inside the project folder!${COLOR_RESET}"
|
||||
exit 1
|
||||
# test for project specific files
|
||||
STATUS=0
|
||||
FILES=(doc/tikz-trackschematic-documentation.sty src/tikz-trackschematic.sty test/turnout.tex)
|
||||
for FILE in ${FILES[@]}; do
|
||||
if [ ! -e $FILE ]; then
|
||||
STATUS=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $STATUS = 0 ]; then
|
||||
if [ $VERBOSE = 1 ]; then
|
||||
echo "Build script is within the project folder."
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "${RED}Please run this script from inside the project folder!${COLOR_RESET}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
## checks for installed software
|
||||
|
|
Loading…
Reference in New Issue