mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
39 lines
1009 B
Bash
Executable File
39 lines
1009 B
Bash
Executable File
#!/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 TARGETS)
|
|
|
|
PACKDIR="out/package"
|
|
FINFO="$PACKDIR/_FileInformation.txt"
|
|
IMGFILE="out/DeskAccessories.po"
|
|
VOLNAME="DESK.ACC"
|
|
|
|
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 "out/$file.built" "out/package/$ucfile"
|
|
done
|
|
|
|
# Create a new disk image.
|
|
|
|
$CADIUS CREATEVOLUME $IMGFILE $VOLNAME 143KB
|
|
|
|
# Add the files into the disk image.
|
|
|
|
for file in $DAS; do
|
|
ucfile=$(echo $file | tr a-z A-Z)
|
|
$CADIUS ADDFILE $IMGFILE "/$VOLNAME" $PACKDIR/$ucfile
|
|
done
|