Adding rebuild to scripts
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Adsooi 2024-10-01 21:50:10 +02:00
parent 07e556da56
commit 1fc19f6ba3
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
7 changed files with 87 additions and 18 deletions

View file

@ -18,7 +18,7 @@ cp ../../../README.md Installer/README.md
# Calculating folder size
duoutput=$(du -h Installer | tail -n1)
size=$(expr ${duoutput%M*} + 2) # +2 for allowing small space to edit.
size=$(( ${duoutput%M*} + 2)) # +2 for allowing small space to edit.
echo "Creating DMG file with size ${size}M."
# Adapted from https://stackoverflow.com/a/1513578
@ -26,7 +26,7 @@ hdiutil create -srcfolder "${source}" -volname "${title}" -fs HFS+ \
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${size}M pack.temp.dmg
device=$(hdiutil attach -readwrite -noverify -noautoopen "pack.temp.dmg" | \
egrep '^/dev/' | sed 1q | awk '{print $1}')
grep -E '^/dev/' | sed 1q | awk '{print $1}')
sleep 3
@ -53,10 +53,10 @@ echo '
end tell
end tell
' | osascript
chmod -Rf go-w /Volumes/"${title}"
chmod -Rf go-w "/Volumes/${title}"
sync
sync
hdiutil detach ${device}
hdiutil detach "${device}"
hdiutil convert "pack.temp.dmg" -format UDZO -imagekey zlib-level=9 -o "${finalDMGName}"
rm -f pack.temp.dmg
rm -rf Installer