#!/bin/sh
#
# Script to download TLE files from celestrak.com
#
STS=http://celestrak.com/NORAD/elements/sts.txt
SPSTATIONS=http://celestrak.com/NORAD/elements/stations.txt
WEATHER=http://celestrak.com/NORAD/elements/weather.txt
NOAA=http://celestrak.com/NORAD/elements/noaa.txt
GOES=http://celestrak.com/NORAD/elements/goes.txt
GEO=http://celestrak.com/NORAD/elements/geo.txt
AMATEUR=http://celestrak.com/NORAD/elements/amateur.txt
VISIBLE=http://celestrak.com/NORAD/elements/visual.txt
#
LOG=~/.xsatcom/wget.log
#
# Uncomment or comment lines to download required files
#
# wget $STS
# wget $SPSTATIONS
# wget $NOAA
# wget $GOES
# wget $GEO
# wget $VISIBLE
echo "get_tle: Downloading TLE file(s)"
cd ~/.satcom &&
wget $AMATEUR &&
wget $WEATHER &&
echo "get_tle: Downloaded TLE file(s)" &&

rm satcom.tle
cat *.txt > satcom.tle &&
echo "get_tle: Created satcom.tle file" &&
rm  *.txt
echo "get_tle: TLE file(s) download completed"
#
