summaryrefslogtreecommitdiff
path: root/comms/predict/files/patch-kepupdate
diff options
context:
space:
mode:
Diffstat (limited to 'comms/predict/files/patch-kepupdate')
-rw-r--r--comms/predict/files/patch-kepupdate28
1 files changed, 28 insertions, 0 deletions
diff --git a/comms/predict/files/patch-kepupdate b/comms/predict/files/patch-kepupdate
new file mode 100644
index 000000000000..4eecf9d367df
--- /dev/null
+++ b/comms/predict/files/patch-kepupdate
@@ -0,0 +1,28 @@
+--- kepupdate.orig 2024-03-27 16:31:40 UTC
++++ kepupdate
+@@ -1,20 +1,19 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Invoke as kepupdate -q in crontab scripts to keep the update "quiet".
+ #
+
+ dir=$HOME/.predict
+
+-wget -qr https://www.amsat.org/tle/current/nasabare.txt -O $dir/amateur.txt
+-wget -qr https://celestrak.org/NORAD/elements/visual.txt -O $dir/visual.txt
+-wget -qr https://celestrak.org/NORAD/elements/weather.txt -O $dir/weather.txt
++fetch https://www.amsat.org/tle/current/nasabare.txt -o $dir/amateur.txt
++fetch https://celestrak.org/NORAD/elements/visual.txt -o $dir/visual.txt
++fetch https://celestrak.org/NORAD/elements/weather.txt -o $dir/weather.txt
+
+ cat $dir/amateur.txt $dir/visual.txt $dir/weather.txt > $dir/keps.tle
+
+ if [ -e $dir/keps.tle ]; then
+ predict -u $dir/keps.tle
+-
+- if [[ $1 != "-q" ]] && [[ $1 != "-quiet" ]] && [[ $1 != "--quiet" ]]; then
++ if [ $1 ] && [ $1 != "-q" ] && [ $1 != "-quiet" ] && [ $1 != "--quiet" ]; then
+ echo "PREDICT's Keps have been updated!"
+ fi
+ fi