wmtools/compile_all.sh

32 lines
644 B
Bash
Raw Normal View History

#!/bin/bash
dont_compile="./base.nim"
req_ssl=("./translate.nim" "./tides.nim")
2022-07-05 14:00:40 +02:00
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"
2022-07-05 14:00:40 +02:00
nim c -d:ssl -d:release $f
compiled=1
break
fi
done
if [[ $compiled == 1 ]]; then
continue
else
echo "Compiling $f"
2022-07-05 14:00:40 +02:00
nim c -d:release $f
fi
done