mirror of
https://github.com/mi57730/a2d.git
synced 2024-12-01 20:50:06 +00:00
32 lines
620 B
Bash
Executable File
32 lines
620 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Run this from the desk.acc 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)
|
|
}
|
|
|
|
mkdir -p mount
|
|
echo "Copying files to mount/"
|
|
for file in $(cat TARGETS); do
|
|
mount "$file"
|
|
done
|