You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
287 B

#!/bin/sh -e
# Get current hour.
x=$(date|cut -f5 -d' '|cut -f1 -d:)
# Get current minute.
y=$(date|cut -f5 -d' '|cut -f2 -d:)
brownout $(bc -e "define redlevel(x,y) {
if((x-12) <= 0)
return((83*(12-x)+(y*(83/60))))
else
return((83*(x-12)+(y*(83/60))))
} redlevel($x, $y)")