mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
added pkgInZip functionality
This commit is contained in:
@@ -43,7 +43,7 @@ BLOCKING_PROCESS_ACTION=prompt_user
|
||||
# - pkg
|
||||
# - zip
|
||||
# - pkgInDmg
|
||||
# - pkgInZip (not yet implemented)
|
||||
# - pkgInZip (not yet tested)
|
||||
#
|
||||
# - downloadURL: (required)
|
||||
# URL to download the dmg.
|
||||
@@ -760,6 +760,23 @@ installPkgInDmg() {
|
||||
installFromPKG
|
||||
}
|
||||
|
||||
installPkgInZip() {
|
||||
# unzip the archive
|
||||
echo "Unzipping $archiveName"
|
||||
tar -xf "$archiveName"
|
||||
|
||||
# locate pkg in zip
|
||||
if [[ -z $pkgName ]]; then
|
||||
pkgName="$name.pkg"
|
||||
fi
|
||||
|
||||
# it is now safe to overwrite archiveName for installFromPKG
|
||||
archiveName="$tmpDir/$pkgName"
|
||||
|
||||
# installFromPkgs
|
||||
installFromPKG
|
||||
}
|
||||
|
||||
runUpdateTool() {
|
||||
if [[ -x $updateTool ]]; then
|
||||
echo "running $updateTool $updateToolArguments"
|
||||
@@ -897,6 +914,9 @@ case $type in
|
||||
pkgInDmg)
|
||||
installPkgInDmg
|
||||
;;
|
||||
pkgInZip)
|
||||
installPkgInZip
|
||||
;;
|
||||
*)
|
||||
echo "Cannot handle type $type"
|
||||
cleanupAndExit 99
|
||||
|
||||
Reference in New Issue
Block a user