aseprite/scripts/create_dmg.sh
2014-02-24 10:06:45 -03:00

28 lines
873 B
Bash

#! /bin/sh
dir="`pwd`"
version=$(cat ../src/config.h | grep VERSION | sed -e 's/.*\"\(.*\)\"/\1/g')
distdir=Aseprite-$version
if [ ! -f create_dmg.sh ]; then
echo You must run create_dmg.sh from scripts/ directory
exit 1
fi
if [ ! -f $distdir.dmg ] ; then
cd "$dir/.."
mkdir "$dir/$distdir"
mkdir "$dir/$distdir/aseprite.app"
mkdir "$dir/$distdir/aseprite.app/Contents"
mkdir "$dir/$distdir/aseprite.app/Contents/MacOS"
mkdir "$dir/$distdir/aseprite.app/Contents/Resources"
cp -R LICENSE.txt docs "$dir/$distdir"
cp -R aseprite "$dir/$distdir/aseprite.app/Contents/MacOS"
cp -R "$dir/macosx/Info.plist" "$dir/$distdir/aseprite.app/Contents"
cp -R data "$dir/macosx/aseprite.icns" "$dir/$distdir/aseprite.app/Contents/Resources"
cd "$dir"
hdiutil create "$distdir.dmg" -srcfolder "$distdir"
rm -fr $distdir
fi