#!/bin/sh

if [ "$(uname -s)" = "Linux" ]
then
	DEFAULT_MOUNT="/media/kyle/ULISP"
else
	DEFAULT_MOUNT="/Volumes/ULISP"
fi

MEDIA="${1:-${DEFAULT_MOUNT}}"

if [ ! -d "${MEDIA}" ]
then
	echo "[!] ${MEDIA} isn't mounted!"
	exit 1
fi

echo "[+] transferring lisp files to ${MEDIA}..."
cp *.lsp "$MEDIA"
echo "[+] unmounting ${MEDIA}"
umount "$MEDIA"
echo "[+] transfer complete"
