From a99b4f441203313a10177c2ae31af39754d22e1b Mon Sep 17 00:00:00 2001 From: mgcaret Date: Fri, 22 Feb 2019 13:23:56 -0800 Subject: [PATCH] shk.sh: use aux type 0640 for DAs (#132) --- res/shk.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/res/shk.sh b/res/shk.sh index 2738059..6bd200f 100755 --- a/res/shk.sh +++ b/res/shk.sh @@ -21,6 +21,7 @@ mkdir -p "${tempdir}/desk.acc" || (cecho red "permission denied"; exit 1) rm -f A2D.SHK +# With $F1 type, aux type $0000 function mount_f1 { srcdir="$2" dstdir="$3" @@ -32,6 +33,19 @@ function mount_f1 { || (cecho red "failed to write $dst" ; return 1) } +# With $F1 type, aux type $0640 +function mount_da { + srcdir="$2" + dstdir="$3" + uppercase=$(echo "$1" | tr /a-z/ /A-Z/) + src="$srcdir/out/$1.built" + dst="$dstdir/$uppercase#F10640" + cp "$src" "$dst" \ + && (cecho green "wrote $dst" ) \ + || (cecho red "failed to write $dst" ; return 1) +} + + function mount_sys { srcdir="$2" dstdir="$3" @@ -52,12 +66,12 @@ mount_sys "ram.system" "ram.system" "${tempdir}" mkdir -p "${tempdir}/desk.acc" for file in $(cat desk.acc/TARGETS); do - mount_f1 "$file" "desk.acc" "${tempdir}/desk.acc" + mount_da "$file" "desk.acc" "${tempdir}/desk.acc" done mkdir -p "${tempdir}/preview" for file in $(cat preview/TARGETS); do - mount_f1 "$file" "preview" "${tempdir}/preview" + mount_da "$file" "preview" "${tempdir}/preview" done cdir=`pwd` cd "${tempdir}"