#!/bin/bash set -e # Download Plan 9 if [ ! -e 9legacy.iso ] && [ ! -e 9legacy.iso.bz2 ]; then curl -L --fail -O https://github.com/Harvey-OS/harvey/releases/download/9legacy/9legacy.iso.bz2 fi if [ ! -e 9legacy.iso ]; then bunzip2 -k 9legacy.iso.bz2 fi # Get the Go program source fetched (cd ../sys/src/cmd/go && sh fetchrepos.sh) # Make directories as needed (cd ..; bash ./build/mkdirs) rm -f harvey.tgz (cd ..; tar --format ustar --exclude './build' --exclude harvey.tgz --exclude .git --exclude '9legacy.iso*' -czf harvey.tgz *) FLAG_KVM="" case $(uname -s) in "Linux") FLAG_KVM="-accel kvm" ;; esac expect <