From 3be197076fa48ba068708b3571941c3d37bad496 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sun, 25 Nov 2018 23:12:40 -0800 Subject: [PATCH] Add top-level package script --- res/mount.sh | 2 +- res/package.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100755 res/package.sh diff --git a/res/mount.sh b/res/mount.sh index 1662af9..d6e29be 100755 --- a/res/mount.sh +++ b/res/mount.sh @@ -1,9 +1,9 @@ #!/bin/bash # Run this from the top level directory -source "res/util.sh" set -e +source "res/util.sh" mkdir -p mount/desk.acc diff --git a/res/package.sh b/res/package.sh new file mode 100755 index 0000000..70868c6 --- /dev/null +++ b/res/package.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Use Cadius to create a disk image for distribution +# https://github.com/mach-kernel/cadius + +set -e + +CADIUS="${CADIUS:-$HOME/dev/cadius/bin/release/cadius}" + +DAS=$(cat desk.acc/TARGETS) + +PACKDIR="out/package" +FINFO="$PACKDIR/_FileInformation.txt" +IMGFILE="out/A2DeskTop.po" +VOLNAME="A2.DESKTOP" + +mkdir -p "$PACKDIR" +echo "" > "$FINFO" + +# Prepare _FileInformation.txt file with extra ProDOS file entry data +# and copy renamed files into package directory. + +for file in $DAS; do + ucfile=$(echo $file | tr a-z A-Z) + echo "$ucfile=Type(F1),AuxType(0640),VersionCreate(00),MinVersion(B9),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)" >> "$FINFO" + cp "desk.acc/out/$file.built" "out/package/$ucfile" +done + +cat > "$FINFO" <