Skip to content

Commit

Permalink
Fix for immutable Nix store
Browse files Browse the repository at this point in the history
  • Loading branch information
ethancedwards8 committed Jun 21, 2021
1 parent e25e7a3 commit 8748783
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/sleep_weather.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fahrenheit=$1
location=$2

LOCKFILE=/tmp/.dracula-tmux-weather.lock
DATAFILE=/tmp/.dracula-tmux-data

ensure_single_process()
{
Expand All @@ -22,15 +23,15 @@ main()

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

if [ ! -f $current_dir/../data/weather.txt ]; then
printf "Loading..." > $current_dir/../data/weather.txt
if [ ! -f $DATAFILE ]; then
printf "Loading..." > $DATAFILE
fi

$current_dir/weather.sh > $current_dir/../data/weather.txt
$current_dir/weather.sh > $DATAFILE

while tmux has-session &> /dev/null
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
then
sleep 1200
Expand Down

0 comments on commit 8748783

Please sign in to comment.