Fix for immutable Nix store
This commit is contained in:
parent
e25e7a3157
commit
8748783b60
1 changed files with 5 additions and 4 deletions
|
@ -8,6 +8,7 @@ fahrenheit=$1
|
||||||
location=$2
|
location=$2
|
||||||
|
|
||||||
LOCKFILE=/tmp/.dracula-tmux-weather.lock
|
LOCKFILE=/tmp/.dracula-tmux-weather.lock
|
||||||
|
DATAFILE=/tmp/.dracula-tmux-data
|
||||||
|
|
||||||
ensure_single_process()
|
ensure_single_process()
|
||||||
{
|
{
|
||||||
|
@ -22,15 +23,15 @@ main()
|
||||||
|
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
if [ ! -f $current_dir/../data/weather.txt ]; then
|
if [ ! -f $DATAFILE ]; then
|
||||||
printf "Loading..." > $current_dir/../data/weather.txt
|
printf "Loading..." > $DATAFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$current_dir/weather.sh > $current_dir/../data/weather.txt
|
$current_dir/weather.sh > $DATAFILE
|
||||||
|
|
||||||
while tmux has-session &> /dev/null
|
while tmux has-session &> /dev/null
|
||||||
do
|
do
|
||||||
$current_dir/weather.sh $fahrenheit $location > $current_dir/../data/weather.txt
|
$current_dir/weather.sh $fahrenheit $location > $DATAFILE
|
||||||
if tmux has-session &> /dev/null
|
if tmux has-session &> /dev/null
|
||||||
then
|
then
|
||||||
sleep 1200
|
sleep 1200
|
||||||
|
|
Loading…
Reference in a new issue