[gimp-macos-build/wip/lukaso/tests] Revert create-dmg changes



commit 8c97477064aada85cd028c6d139b32a4916738d2
Author: Lukas Oberhuber <lukaso gmail com>
Date:   Mon Oct 18 23:12:15 2021 +0100

    Revert create-dmg changes

 package/create-dmg/create-dmg | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
---
diff --git a/package/create-dmg/create-dmg b/package/create-dmg/create-dmg
index f570342..ca5dcc6 100755
--- a/package/create-dmg/create-dmg
+++ b/package/create-dmg/create-dmg
@@ -349,25 +349,11 @@ EOS
        fi
 }
 
-# convenience function to run a command as the current user
-# usage:
-#   runAsUser command arguments...
-runAsUser() {
-  if [ "$currentUser" != "loginwindow" ]; then
-    launchctl asuser "$uid" sudo -u "$currentUser" "$@"
-  else
-    echo "no user logged in"
-    # uncomment the exit command
-    # to make the function exit with an error when no user is logged in
-    exit 1
-  fi
-}
-
 if [ $SKIP_JENKINS -eq 0 ]; then
        applescript_source | sed -e "s/WINX/$WINX/g" -e "s/WINY/$WINY/g" -e "s/WINW/$WINW/g" -e 
"s/WINH/$WINH/g" -e "s/BACKGROUND_CLAUSE/$BACKGROUND_CLAUSE/g" -e 
"s/REPOSITION_HIDDEN_FILES_CLAUSE/$REPOSITION_HIDDEN_FILES_CLAUSE/g" -e "s/ICON_SIZE/$ICON_SIZE/g" -e 
"s/TEXT_SIZE/$TEXT_SIZE/g" | perl -pe  "s/POSITION_CLAUSE/$POSITION_CLAUSE/g" | perl -pe 
"s/QL_CLAUSE/$QL_CLAUSE/g" | perl -pe "s/APPLICATION_CLAUSE/$APPLICATION_CLAUSE/g" | perl -pe 
"s/HIDING_CLAUSE/$HIDING_CLAUSE/" >"$APPLESCRIPT"
        sleep 2 # pause to workaround occasional "Can’t get disk" (-1728) issues
        echo "Running Applescript: /usr/bin/osascript \"${APPLESCRIPT}\" \"${VOLUME_NAME}\""
-       (runAsUser /usr/bin/osascript "${APPLESCRIPT}" "${VOLUME_NAME}" || if [[ "$?" -ne 0 ]]; then echo 
"Failed running AppleScript"; hdiutil detach "${DEV_NAME}"; exit 64; fi)
+       (/usr/bin/osascript "${APPLESCRIPT}" "${VOLUME_NAME}" || if [[ "$?" -ne 0 ]]; then echo "Failed 
running AppleScript"; hdiutil detach "${DEV_NAME}"; exit 64; fi)
        echo "Done running the applescript..."
        sleep 4
        rm "$APPLESCRIPT"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]