From bf740d1ffe99b1e94377a3360623970a9706069a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Wed, 9 Feb 2022 14:23:32 +0100 Subject: [PATCH] Update functions.sh --- fragments/functions.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index 9e897b2..4423463 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -668,23 +668,22 @@ installPkgInDmg() { cleanupAndExit 20 "couldn't find pkg in dmg $archiveName" ERROR fi archiveName="${filearray[1]}" - printlog "found pkg: $archiveName" else if [[ -s "$tmpDir/$pkgName" ]] ; then archiveName="$tmpDir/$pkgName" else # try searching for pkg - findfiles=$(find "$tmpDir" -iname "$pkgName") + findfiles=$(find "$dmgmount" -iname "$pkgName") # was: $tmpDir filearray=( ${(f)findfiles} ) if [[ ${#filearray} -eq 0 ]]; then - cleanupAndExit 20 "couldn't find pkg “$pkgName” in zip $archiveName" ERROR + cleanupAndExit 20 "couldn't find pkg “$pkgName” in dmg $archiveName" ERROR fi # it is now safe to overwrite archiveName for installFromPKG archiveName="${filearray[1]}" - printlog "found pkg: $archiveName" fi fi - + printlog "found pkg: $archiveName" + # installFromPkgs installFromPKG }