# Script to create an upstream .tar.gz file for simh version 3.6.1
# Depends on packages wget and unzip
# This file is 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/simhv36-1.zip
wget http://simh.trailing-edge.com/sources/simtools.zip
mkdir simh-3.6.1
cd simh-3.6.1
cp ../simhv36-1.zip .
unzip simhv36-1.zip
rm simhv36-1.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/extracters/rawcopy # 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 VAX/vmb.exe # msdos executable
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.
cd ..
tar -czf simh_3.6.1.tar.gz simh-3.6.1/

