duplicati/ReleaseBuilder/Resources/MacOS/AppBundle/templatebuilder/create.sh
Kenneth Skovhede 66daba4b3b
Update dmg file (#5844)
* Added resources and script to create DMG template

* Created new empty DMG
2025-01-06 20:59:30 +01:00

33 lines
776 B
Bash
Executable file

# Create file to prevent file RO image
rm rw.*.template.dmg
touch template.dmg
mkdir -p ./scaffold/Duplicati.app
touch ./scaffold/Duplicati.app/unused.txt
create-dmg \
--volname Duplicati \
--volicon volicon.icns \
--background background.png \
--text-size 16 \
--icon-size 120 \
--icon Duplicati.app 150 120 \
--app-drop-link 360 120 \
--disk-image-size 200 \
template.dmg \
./scaffold
# Remove dummy and capture RW image
rm template.dmg
rm -rf scaffold
NAME=(rw.*.template.dmg)
if [[ "$NAME" == "rw.*.template.dmg" ]]; then
echo "No matching file found"
elif [[ "$NAME" == *' '* ]]; then
echo "Error: More than one file matched"
else
mv "$NAME" template.dmg
bzip2 -z -9 template.dmg
mv template.dmg.bz2 ../template.dmg.bz2
fi