mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-28 15:50:16 +00:00
Use a common mount/ directory
This commit is contained in:
parent
da715ed9ce
commit
4689d3ea84
@ -3,22 +3,7 @@
|
||||
# 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 do_make {
|
||||
make $MAKE_FLAGS "$1" \
|
||||
&& (cecho green "make $1 good") \
|
||||
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
|
||||
}
|
||||
source "../res/util.sh"
|
||||
|
||||
function verify {
|
||||
diff "orig/$1.bin" "out/$1.built" \
|
||||
@ -48,8 +33,3 @@ stats "show.text.file.s"
|
||||
stats "date.s"
|
||||
stats "puzzle.s"
|
||||
stats "sort.directory.s"
|
||||
|
||||
# Mountable directory for Virtual ][
|
||||
if [ -d mount ]; then
|
||||
res/mount.sh
|
||||
fi
|
||||
|
@ -1,31 +0,0 @@
|
||||
#!/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
|
@ -1,22 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run this from the desktop.system 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 do_make {
|
||||
make $MAKE_FLAGS "$1" \
|
||||
&& (cecho green "make $1 good") \
|
||||
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
|
||||
}
|
||||
source "../res/util.sh"
|
||||
|
||||
function verify {
|
||||
diff "orig/$1" "out/$2" \
|
||||
|
@ -1,22 +1,9 @@
|
||||
#!/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 do_make {
|
||||
make $MAKE_FLAGS "$1" \
|
||||
&& (cecho green "make $1 good") \
|
||||
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
|
||||
}
|
||||
source "../res/util.sh"
|
||||
|
||||
function verify {
|
||||
diff "orig/$1" "out/$2" \
|
||||
|
22
res/go.sh
Executable file
22
res/go.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run this from the top level directory
|
||||
|
||||
set -e
|
||||
|
||||
cd desktop.system
|
||||
res/go.sh
|
||||
cd ..
|
||||
|
||||
cd desktop
|
||||
res/go.sh
|
||||
cd ..
|
||||
|
||||
cd desk.acc
|
||||
res/go.sh
|
||||
cd ..
|
||||
|
||||
# Mountable directory for Virtual ][
|
||||
if [ -d mount ]; then
|
||||
res/mount.sh
|
||||
fi
|
42
res/mount.sh
Executable file
42
res/mount.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run this from the top level directory
|
||||
source "res/util.sh"
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p mount/desk.acc
|
||||
|
||||
function mount_f1 {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
src="$srcdir/out/$1.built"
|
||||
dst="$dstdir/$uppercase.\$F1"
|
||||
cp "$src" "$dst" \
|
||||
&& xattr -wx prodos.AuxType '40 06' "$dst" \
|
||||
&& (cecho green "mounted $dst" ) \
|
||||
|| (cecho red "failed to mount $dst" ; return 1)
|
||||
}
|
||||
|
||||
function mount_sys {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
src="$srcdir/out/$1.SYS"
|
||||
dst="$dstdir/$uppercase.SYS"
|
||||
cp "$src" "$dst" \
|
||||
&& (cecho green "mounted $dst" ) \
|
||||
|| (cecho red "failed to mount $dst" ; return 1)
|
||||
}
|
||||
|
||||
targets=$(cat desk.acc/TARGETS)
|
||||
|
||||
mkdir -p mount
|
||||
echo "Copying files to mount/"
|
||||
for file in $targets; do
|
||||
mount_f1 "$file" "desk.acc" "mount/desk.acc"
|
||||
done
|
||||
|
||||
mount_f1 "desktop2" "desktop" "mount"
|
||||
mount_sys "desktop.system" "desktop.system" "mount"
|
15
res/util.sh
Normal file
15
res/util.sh
Normal file
@ -0,0 +1,15 @@
|
||||
function cecho {
|
||||
case $1 in
|
||||
red) tput setaf 1 ;;
|
||||
green) tput setaf 2 ;;
|
||||
yellow) tput setaf 3 ;;
|
||||
esac
|
||||
echo -e "$2"
|
||||
tput sgr0
|
||||
}
|
||||
|
||||
function do_make {
|
||||
make $MAKE_FLAGS "$1" \
|
||||
&& (cecho green "make $1 good") \
|
||||
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
|
||||
}
|
Loading…
Reference in New Issue
Block a user