mirror of
https://github.com/mi57730/a2d.git
synced 2024-08-17 11:28:58 +00:00
34 lines
633 B
Bash
34 lines
633 B
Bash
|
#!/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
|