Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 60 lines (46 sloc) 1.36 KB
# generate dmg pkg
macdeployqt -dmg
# convert to read-write image
rm Rythem-rw.dmg
hdiutil convert Rythem.dmg -format UDRW -o Rythem-rw.dmg
# open read-write image
tmp=`hdiutil attach -readwrite -noverify -noautoopen Rythem-rw.dmg`;
echo "tmp = $tmp"
# get the opened image's device path and file path
dev=`echo "$tmp" | awk 'END{print $1}'`
# targetDir should be "/Volumne/Rythem 1" or "/Volumn/Rythem"
# if target Dir is number, it should be "/Volumne/Rythem 1"
targetDir=`echo "$tmp" | awk 'END{
if( RLENGTH -eq -1 ){
print $NF;
print $(NF-1),$NF;
echo $targetDir
# save current directory and jump to opened image file path
# make background
# todo
cd "$targetDir"
# make introduce file
echo "copying"
cp $1/ ./
# link /Applications to the image
echo "linking to Applications"
ln -s /Applications Applications
# make icon
echo "copying icns"
cp $1/Rythem2.icns ./.VolumeIcon.icns
# back
cd $tmpDir
hdiutil detach -force $dev
rm -f Rythem-release.dmg
hdiutil convert Rythem-rw.dmg -format UDZO -o Rythem-release.dmg
mv -f Rythem-release.dmg ~/
rm $2/Rythem-rw.dmg
rm $2/Rythem.dmg
# remove
rm -rf
Jump to Line
Something went wrong with that request. Please try again.