wmtools/compile_all.sh

32 lines
644 B
Bash
Executable file

#!/bin/bash
dont_compile="./base.nim"
req_ssl=("./translate.nim" "./tides.nim")
dependencies=("configparser")
for d in "${dependencies[@]}"; do
nimble install $d -n
done
for f in ./*.nim; do
if [[ $f == $dont_compile ]]; then
echo "Not compiling $f"
continue
fi
compiled=0
for i in "${req_ssl[@]}"
do
if [[ $f == $i ]]; then
echo "Compiling $f with SSL"
nim c -d:ssl -d:release $f
compiled=1
break
fi
done
if [[ $compiled == 1 ]]; then
continue
else
echo "Compiling $f"
nim c -d:release $f
fi
done