enhanced path check in build script
parent
1ac4d7a596
commit
beb481d2a7
20
build.sh
20
build.sh
|
@ -128,10 +128,24 @@ sedi () {
|
||||||
## -- commands
|
## -- commands
|
||||||
|
|
||||||
check_path() {
|
check_path() {
|
||||||
if [ ! -d ../tikz-trackschematic ]; then
|
# test for project specific files
|
||||||
echo "${RED}Please run this script from inside the project folder!${COLOR_RESET}"
|
STATUS=0
|
||||||
exit 1
|
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
|
fi
|
||||||
|
|
||||||
|
echo "${RED}Please run this script from inside the project folder!${COLOR_RESET}"
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
## checks for installed software
|
## checks for installed software
|
||||||
|
|
Loading…
Reference in New Issue