diff --git a/Makefile b/Makefile index 4106041a..99cfd38b 100644 --- a/Makefile +++ b/Makefile @@ -152,7 +152,11 @@ package: cp -R JavaApp/libs_caciocavallo/* Natives/build/PojavLauncher.app/libs_caciocavallo/ || exit 1; \ mkdir -p packages/pojavlauncher_iphoneos-arm/{Applications,var/mobile/Documents/{minecraft,.pojavlauncher,Library/{Application\ Support,Caches}}} || exit 1; \ ( cd packages/pojavlauncher_iphoneos-arm/var/mobile/Documents && ln -sf ../../minecraft "Library/Application Support/minecraft" ) || exit 1; \ - sudo chown 501:501 packages/pojavlauncher_iphoneos-arm/var/mobile/Documents/* || exit 1; \ + if [ '$(NOSTDIN)' = '1' ]; then \ + echo '$(SUDOPASS)' | sudo -S chown 501:501 packages/pojavlauncher_iphoneos-arm/var/mobile/Documents/* || exit 1; \ + else \ + sudo chown 501:501 packages/pojavlauncher_iphoneos-arm/var/mobile/Documents/* || exit 1; \ + fi; \ cp -R Natives/build/PojavLauncher.app packages/pojavlauncher_iphoneos-arm/Applications; \ cp -R DEBIAN packages/pojavlauncher_iphoneos-arm/DEBIAN; \ ldid -Sentitlements.xml packages/pojavlauncher_iphoneos-arm/Applications/PojavLauncher.app || exit 1; \ @@ -171,7 +175,11 @@ package: cp JavaApp/local_out/launcher.jar Natives/build/PojavLauncher.app/libs/ || exit 1; \ mkdir -p packages/pojavlauncher_iphoneos-arm/{Applications,var/mobile/Documents/{minecraft,.pojavlauncher,Library/{Application\ Support,Caches}}} || exit 1; \ ( cd packages/pojavlauncher_iphoneos-arm/var/mobile/Documents && ln -sf ../../minecraft "Library/Application Support/minecraft" ) || exit 1; \ - sudo chown 501:501 packages/pojavlauncher_iphoneos-arm/var/mobile/Documents/* || exit 1; \ + if [ '$(NOSTDIN)' = '1' ]; then \ + echo '$(SUDOPASS)' | sudo -S chown 501:501 packages/pojavlauncher_iphoneos-arm/var/mobile/Documents/* || exit 1; \ + else \ + sudo chown 501:501 packages/pojavlauncher_iphoneos-arm/var/mobile/Documents/* || exit 1; \ + fi; \ cp -R Natives/build/PojavLauncher.app packages/pojavlauncher_iphoneos-arm/Applications; \ cp -R DEBIAN packages/pojavlauncher_iphoneos-arm/DEBIAN; \ ldid -Sentitlements.xml packages/pojavlauncher_iphoneos-arm/Applications/PojavLauncher.app || exit 1; \