2020-03-15 05:13:46 +01:00
|
|
|
#/usr/bin/env bash
|
|
|
|
|
|
|
|
#wrapper script for running weather on interval
|
|
|
|
|
|
|
|
main()
|
|
|
|
{
|
2020-03-16 07:15:26 +01:00
|
|
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
$current_dir/weather.sh > $current_dir/../data/weather.txt
|
|
|
|
|
2020-03-16 01:20:04 +01:00
|
|
|
while tmux has-session &> /dev/null
|
2020-03-15 05:13:46 +01:00
|
|
|
do
|
2020-03-16 07:15:26 +01:00
|
|
|
$current_dir/weather.sh > $current_dir/../data/weather.txt
|
2020-03-15 20:59:20 +01:00
|
|
|
if tmux has-session &> /dev/null
|
|
|
|
then
|
2020-03-16 01:20:04 +01:00
|
|
|
sleep 1000
|
2020-03-15 20:41:10 +01:00
|
|
|
else
|
|
|
|
break
|
|
|
|
fi
|
2020-03-15 05:13:46 +01:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
#run main driver function
|
|
|
|
main
|