Skip to content

Commit

Permalink
Revert "added timeout to the weather_wrapper.sh script"
Browse files Browse the repository at this point in the history
This reverts commit 66e3b0a.
  • Loading branch information
fvincenzo committed Oct 18, 2024
1 parent 6c431a1 commit 4c37751
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions scripts/weather_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ fixedlocation=$3
DATAFILE=/tmp/.dracula-tmux-data
LAST_EXEC_FILE="/tmp/.dracula-tmux-weather-last-exec"
RUN_EACH=1200
RETRY_EACH=60
TIME_NOW=$(date +%s)
TIME_LAST=$(cat "${LAST_EXEC_FILE}" 2>/dev/null || echo "0")

Expand All @@ -23,10 +22,6 @@ main()
# Run weather script here
$current_dir/weather.sh $fahrenheit $location "$fixedlocation" > "${DATAFILE}"
echo "${TIME_NOW}" > "${LAST_EXEC_FILE}"
elif grep -q 'Unavailable\|Error' "${DATAFILE}" && [ "$(expr ${TIME_LAST} + ${RETRY_EACH})" -lt "${TIME_NOW}" ]; then
# Run weather script here
$current_dir/weather.sh $fahrenheit $location "$fixedlocation" > "${DATAFILE}"
echo "${TIME_NOW}" > "${LAST_EXEC_FILE}"
fi

cat "${DATAFILE}"
Expand Down

0 comments on commit 4c37751

Please sign in to comment.