Skip to content

Commit

Permalink
[tracking] new iridium sats are in iridium-NEXT.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec42 committed Apr 15, 2024
1 parent 5da3d05 commit 4861ee3
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions tracking/update-tracking
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
DATE=`date -Iseconds`

rm iridium.txt
wget http://www.celestrak.com/NORAD/elements/iridium.txt
cp iridium.txt tle/iridium-$DATE.txt
#!/bin/sh

rm iridium-NEXT.txt
wget http://www.celestrak.com/NORAD/elements/iridium-NEXT.txt
cp iridium-NEXT.txt tle/iridium-NEXT-$DATE.txt
DATE=`date -Iseconds`
files="iridium-NEXT.txt"
[ ! -z "$1" ] && files="$file iridium.txt tle-new.txt"

for f in $files ; do
if [ -f $f ] ; then
mv $f $f.old
else
touch $f.old
fi
curl -sLO http://celestrak.com/NORAD/elements/$f
if cmp -s $f.old $f ; then
echo "$f is unchanged"
rm $f.old
else
echo "Saving new version of $f"
cp $f tle/${f%.txt}-$DATE.txt
fi
done

0 comments on commit 4861ee3

Please sign in to comment.