# Script to create upstream .tar.gz files for simh version 3.3.2
# Depends on packages wget and unzip
# This file started as a plain english text file
# it it now an executable script
# run it with this command line:
# /bin/bash ./upstream.txt
# The output tar file will be in ./upstream/

mkdir upstream
cd upstream
wget http://simh.trailing-edge.com/sources/simhv33-2.zip
wget http://simh.trailing-edge.com/sources/simtools.zip
mkdir simh-3.3.2
cd simh-3.3.2
cp ../simhv33-2.zip .
unzip simhv33-2.zip
rm simhv33-2.zip
mkdir TOOLS
cd TOOLS/
cp ../../simtools.zip .
unzip simtools.zip
rm simtools.zip
cd ..
rm TOOLS/extracters/ckabstape.c # unknown licensing
rm -Rf TOOLS/extracters/backup # original author unknown = unknown licensing
rm -Rf TOOLS/putr 
rm TOOLS/*.exe # don't need, don't trust msdos executables
rm TOOLS/ods2_readme.txt # docs for a utility not included
rm VAX/ka655.bin # No license, owned by DEC ?, no src See bug 180828
rm VAX/ka655x.bin # see line above
rm -Rf Ibm1130 # license only allows "use" not redistribution
# admittedly, "use" is a universal verb that can be nearly any action
# but I'd prefer to remove it until explicit permission to redistribute 
# is granted.
rm NOVA/eclipse* # In "eclipse_tt.c" "Commercial use prohibited"
cd ..
tar -czf simh_3.3.2.tar.gz simh-3.3.2/

