#!/bin/sh

# > overwrites old file; >> concatenates.

# note order is important so path comes out on top!
# (should really fix levels in scripts)

TMP_DIR="/tmp"
TMP_FILE="temp_both.fig"
LOCATION="$TMP_DIR/$TMP_FILE"

cat coordinate_system.fig > "$LOCATION"

# -file sats.dump at end overrides any provided -file,
# allowing -file to be set for plot_path.

perl plot_sats.pl $* -file sats.dump -scale 30 >> "$LOCATION"

# -nomap prevents map from being included twice

perl plot_path.pl -nomap $* -scale 30  >> "$LOCATION"

exec xfig "$LOCATION" &
