[Title] add makeDmgFromZip util
authorHyoun Jiil <jiil.hyoun@samsung.com>
Tue, 11 Jun 2013 10:00:13 +0000 (19:00 +0900)
committerHyoun Jiil <jiil.hyoun@samsung.com>
Tue, 11 Jun 2013 10:00:13 +0000 (19:00 +0900)
[Type] Enhancement
[Module] Toolchain /
[Priority] Major
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I7180825a6264359b75c572c02d2f86a16c9a8f77

utils/makeDmgFromZip

index 7da4155..88e1ec9 100644 (file)
@@ -4,8 +4,24 @@ SDK_PKG_FILE=$2
 DMG_NAME=$1
 
 #check tools
+REQUIRE_BINARY="hdiutil"
+echo "Checking Prerequisite..."
+for bin in $REQUIRE_BINARY
+do
+       if [ "`which $bin 2>/dev/null`" ] ; then
+               echo "checking $bin... OK"
+       else
+               echo "checking $bin... is not installed"
+               exit 1
+       fi
+done
 
 # extract
+rm -rf ./data
+unzip $SDK_PKG_FILE -d ./
 
 # make dmg
-hdiutil create ./${DMG_NAME}.dmg -srcfolder ./&quot;${APP_NAME}.app&quot; -ov"
+hdiutil create ./${DMG_NAME}.dmg -srcfolder ./data/install-manager/*.app -ov
+
+# remove extracted files
+rm -rf ./data