1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-20 20:44:48 +01:00
strawberry-audio-player-win.../dist/macos/create-dmg.sh.in
2019-07-17 22:05:41 +02:00

25 lines
556 B
Bash
Executable File

#!/bin/sh
version="@STRAWBERRY_VERSION_PACKAGE@"
if [ -z "$1" ]; then
echo "Usage: $0 <bundle.app> (append)"
exit 1
fi
name=$(basename "$1" | perl -pe 's/(.*).app/\1/')
bundle_dir="$1"
temp_dir="dmg/$name"
if [ -z "$2" ]; then
output_file="$name-$version.dmg"
else
output_file="$name-$2-$version.dmg"
fi
rm -rf "$temp_dir"
rm -f "$output_file"
mkdir -p "$temp_dir"
create-dmg --volname "$name" --background ../dist/macos/dmg_background.png --app-drop-link 450 218 --icon $bundle_dir 150 218 --window-size 600 450 $output_file $bundle_dir