corrected compile all to compile translate with ssl flag

This commit is contained in:
Paul Wilde 2022-05-24 13:46:59 +01:00
parent 6543416654
commit ccf397ba00
2 changed files with 23 additions and 2 deletions

View file

@ -47,7 +47,7 @@ proc brightnessDown() =
proc getBrightness*(run_once: bool = false) =
var last_pcnt: float = 0
while true:
let current = parseInt(strip(readFile("/sys/class/backlight/" & backlight & "actual_brightness")))
let current = parseInt(strip(readFile("/sys/class/backlight/" & backlight & "/actual_brightness")))
let pcnt = (current/limit)*100
if pcnt != last_pcnt:
let text = getDesign(pcnt)

View file

@ -1,5 +1,26 @@
#!/bin/bash
dont_compile="./base.nim"
req_ssl=("./translate.nim" "./tides.nim")
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 $f
compiled=1
break
fi
done
if [[ $compiled == 1 ]]; then
continue
else
echo "Compiling $f"
nim c $f
fi
done