From ff8a9c2c3a6365984c35b2d894ed444b76609982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Wed, 9 Feb 2022 14:38:58 +0100 Subject: [PATCH] Few more DEBUG loggings --- fragments/functions.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index 4423463..3b0df4a 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -663,17 +663,19 @@ installPkgInDmg() { if [[ -z $pkgName ]]; then # find first file ending with 'pkg' findfiles=$(find "$dmgmount" -iname "*.pkg" -type f -maxdepth 1 ) + printlog "Found pkg(s):\n$findfiles" DEBUG filearray=( ${(f)findfiles} ) if [[ ${#filearray} -eq 0 ]]; then cleanupAndExit 20 "couldn't find pkg in dmg $archiveName" ERROR fi archiveName="${filearray[1]}" else - if [[ -s "$tmpDir/$pkgName" ]] ; then + if [[ -s "$dmgmount/$pkgName" ]] ; then # was: $tmpDir archiveName="$tmpDir/$pkgName" else # try searching for pkg findfiles=$(find "$dmgmount" -iname "$pkgName") # was: $tmpDir + printlog "Found pkg(s):\n$findfiles" DEBUG filearray=( ${(f)findfiles} ) if [[ ${#filearray} -eq 0 ]]; then cleanupAndExit 20 "couldn't find pkg “$pkgName” in dmg $archiveName" ERROR @@ -697,6 +699,7 @@ installPkgInZip() { if [[ -z $pkgName ]]; then # find first file ending with 'pkg' findfiles=$(find "$tmpDir" -iname "*.pkg" -type f -maxdepth 2 ) + printlog "Found pkg(s):\n$findfiles" DEBUG filearray=( ${(f)findfiles} ) if [[ ${#filearray} -eq 0 ]]; then cleanupAndExit 20 "couldn't find pkg in zip $archiveName" ERROR