Skip to content

Commit 8748783

Browse files
Fix for immutable Nix store
1 parent e25e7a3 commit 8748783

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/sleep_weather.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ fahrenheit=$1
88
location=$2
99

1010
LOCKFILE=/tmp/.dracula-tmux-weather.lock
11+
DATAFILE=/tmp/.dracula-tmux-data
1112

1213
ensure_single_process()
1314
{
@@ -22,15 +23,15 @@ main()
2223

2324
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2425

25-
if [ ! -f $current_dir/../data/weather.txt ]; then
26-
printf "Loading..." > $current_dir/../data/weather.txt
26+
if [ ! -f $DATAFILE ]; then
27+
printf "Loading..." > $DATAFILE
2728
fi
2829

29-
$current_dir/weather.sh > $current_dir/../data/weather.txt
30+
$current_dir/weather.sh > $DATAFILE
3031

3132
while tmux has-session &> /dev/null
3233
do
33-
$current_dir/weather.sh $fahrenheit $location > $current_dir/../data/weather.txt
34+
$current_dir/weather.sh $fahrenheit $location > $DATAFILE
3435
if tmux has-session &> /dev/null
3536
then
3637
sleep 1200

0 commit comments

Comments
 (0)