Fix for immutable Nix store

This commit is contained in:
Ethan Edwards 2021-06-20 22:02:57 -04:00
parent e25e7a3157
commit 8748783b60
No known key found for this signature in database
GPG key ID: F1AD8EEE1366610B

View file

@ -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