mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-26 13:14:15 +00:00
Few more DEBUG loggings
This commit is contained in:
@@ -663,17 +663,19 @@ installPkgInDmg() {
|
|||||||
if [[ -z $pkgName ]]; then
|
if [[ -z $pkgName ]]; then
|
||||||
# find first file ending with 'pkg'
|
# find first file ending with 'pkg'
|
||||||
findfiles=$(find "$dmgmount" -iname "*.pkg" -type f -maxdepth 1 )
|
findfiles=$(find "$dmgmount" -iname "*.pkg" -type f -maxdepth 1 )
|
||||||
|
printlog "Found pkg(s):\n$findfiles" DEBUG
|
||||||
filearray=( ${(f)findfiles} )
|
filearray=( ${(f)findfiles} )
|
||||||
if [[ ${#filearray} -eq 0 ]]; then
|
if [[ ${#filearray} -eq 0 ]]; then
|
||||||
cleanupAndExit 20 "couldn't find pkg in dmg $archiveName" ERROR
|
cleanupAndExit 20 "couldn't find pkg in dmg $archiveName" ERROR
|
||||||
fi
|
fi
|
||||||
archiveName="${filearray[1]}"
|
archiveName="${filearray[1]}"
|
||||||
else
|
else
|
||||||
if [[ -s "$tmpDir/$pkgName" ]] ; then
|
if [[ -s "$dmgmount/$pkgName" ]] ; then # was: $tmpDir
|
||||||
archiveName="$tmpDir/$pkgName"
|
archiveName="$tmpDir/$pkgName"
|
||||||
else
|
else
|
||||||
# try searching for pkg
|
# try searching for pkg
|
||||||
findfiles=$(find "$dmgmount" -iname "$pkgName") # was: $tmpDir
|
findfiles=$(find "$dmgmount" -iname "$pkgName") # was: $tmpDir
|
||||||
|
printlog "Found pkg(s):\n$findfiles" DEBUG
|
||||||
filearray=( ${(f)findfiles} )
|
filearray=( ${(f)findfiles} )
|
||||||
if [[ ${#filearray} -eq 0 ]]; then
|
if [[ ${#filearray} -eq 0 ]]; then
|
||||||
cleanupAndExit 20 "couldn't find pkg “$pkgName” in dmg $archiveName" ERROR
|
cleanupAndExit 20 "couldn't find pkg “$pkgName” in dmg $archiveName" ERROR
|
||||||
@@ -697,6 +699,7 @@ installPkgInZip() {
|
|||||||
if [[ -z $pkgName ]]; then
|
if [[ -z $pkgName ]]; then
|
||||||
# find first file ending with 'pkg'
|
# find first file ending with 'pkg'
|
||||||
findfiles=$(find "$tmpDir" -iname "*.pkg" -type f -maxdepth 2 )
|
findfiles=$(find "$tmpDir" -iname "*.pkg" -type f -maxdepth 2 )
|
||||||
|
printlog "Found pkg(s):\n$findfiles" DEBUG
|
||||||
filearray=( ${(f)findfiles} )
|
filearray=( ${(f)findfiles} )
|
||||||
if [[ ${#filearray} -eq 0 ]]; then
|
if [[ ${#filearray} -eq 0 ]]; then
|
||||||
cleanupAndExit 20 "couldn't find pkg in zip $archiveName" ERROR
|
cleanupAndExit 20 "couldn't find pkg in zip $archiveName" ERROR
|
||||||
|
|||||||
Reference in New Issue
Block a user