a2d/desktop/res/mount.sh
Joshua Bell 0c16467fd5 Bump version to 1.2
* Drop dead (?) code segment
* Add mount scropt (for Virtual ][)
2018-12-09 20:08:38 -08:00

34 lines
633 B
Bash
Executable File

#!/bin/bash
# Run this from the desktop directory
set -e
function cecho {
case $1 in
red) tput setaf 1 ;;
green) tput setaf 2 ;;
yellow) tput setaf 3 ;;
esac
echo -e "$2"
tput sgr0
}
function mount {
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
src="out/$1.built"
dst="mount/$uppercase.\$F1"
cp "$src" "$dst" \
&& xattr -wx prodos.AuxType '40 06' "$dst" \
&& (cecho green "mounted $dst" ) \
|| (cecho red "failed to mount $dst" ; return 1)
}
targets="desktop2"
mkdir -p mount
echo "Copying files to mount/"
for file in $targets; do
mount "$file"
done