#!/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=~/.satcom/wget.log

cd ~/.satcom

# Uncomment or comment lines to download required files
#
#wget $STS
#wget $SPSTATIONS
wget $WEATHER
#wget $NOAA
#wget $GOES
wget $AMATEUR
#wget $GEO
#wget $VISIBLE

rm satcom.tle
cat *.txt > satcom.tle
rm  *.txt

rm ~/.xsatcom/xsatcom.tle
cp satcom.tle ~/.xsatcom/xsatcom.tle