#!/bin/sh
temp_scripts_location="/Users/pedro/script-values/brightness"
old_val="$(cat $temp_scripts_location)"
new_val=`echo $old_val + 0.1 | bc`
max=1.0
if (( $(echo "$new_val > $max" |bc -l) )); then
    new_val=1.0
fi
brightness $new_val
echo $new_val > $temp_scripts_location
