1
0
forked from GitHub/gf-rgl

Make.sh: halt on error, skip non-existant files

Was trying to compile src/*/SymbolHeb.gf which doesn't exist
This commit is contained in:
John J. Camilleri
2018-08-09 10:05:10 +02:00
parent 60f19691eb
commit 73948e54a6

View File

@@ -3,6 +3,7 @@
# --- # ---
# Non-Haskell RGL build script for Unix-based machines # Non-Haskell RGL build script for Unix-based machines
# --- # ---
set -e
# Get languages from config # Get languages from config
langs=$(tail -n +2 languages.csv | awk -F ',' '{ if ($6 != "n") { print $1 } }') langs=$(tail -n +2 languages.csv | awk -F ',' '{ if ($6 != "n") { print $1 } }')
@@ -73,6 +74,7 @@ for lang in $langs; do
if [ $mod == "Try" ] && [[ "$langs_try" != *"$lang"* ]]; then continue; fi if [ $mod == "Try" ] && [[ "$langs_try" != *"$lang"* ]]; then continue; fi
if [ $mod == "Symbolic" ] && [[ "$langs_symbolic" != *"$lang"* ]]; then continue; fi if [ $mod == "Symbolic" ] && [[ "$langs_symbolic" != *"$lang"* ]]; then continue; fi
for file in "${src}"/*/"${mod}${lang}".gf; do for file in "${src}"/*/"${mod}${lang}".gf; do
if [ ! -f "$file" ]; then continue; fi
if [[ "$langs_present" = *"$lang"* ]]; then modules_present="${modules_present} ${file}"; fi if [[ "$langs_present" = *"$lang"* ]]; then modules_present="${modules_present} ${file}"; fi
modules_alltenses="${modules_alltenses} ${file}" modules_alltenses="${modules_alltenses} ${file}"
done done