Files
PojavLauncher_iOS/scripts/build_package.sh
T
Adam Tunnic e6993906e5 Updates scripts
- No more clang-only
- Optional DEVICE_IP and DEVICE_PORT variables to allow hands-free installation
- Made sure workflow works smoothly
2021-06-02 12:23:40 +07:00

26 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
mkdir -p packages/pojavlauncher_iphoneos-arm/{Applications,var/mobile/Documents/minecraft,var/mobile/Documents/.pojavlauncher}
sudo chown 501:501 packages/pojavlauncher_iphoneos-arm/var/mobile/Documents/*
cp -R Natives/build/Release-iphoneos/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
fakeroot dpkg-deb -b packages/pojavlauncher_iphoneos-arm
if [[ "$DEVICE_IP" != "" ]];
then
if [[ "$DEVICE_PORT" != "" ]];
then
scp -P $DEVICE_PORT packages/pojavlauncher_iphoneos-arm.deb root@$DEVICE_IP:/var/tmp/pojavlauncher_iphoneos-arm.deb
ssh root@$DEVICE_IP -p $DEVICE_PORT -t "dpkg -i /var/tmp/pojavlauncher_iphoneos-arm.deb; uicache -p /Applications/PojavLauncher.app"
else
scp packages/pojavlauncher_iphoneos-arm.deb root@$DEVICE_IP:/var/tmp/pojavlauncher_iphoneos-arm.deb
ssh root@$DEVICE_IP -t "dpkg -i /var/tmp/pojavlauncher_iphoneos-arm.deb; uicache -p /Applications/PojavLauncher.app"
fi
else
echo "Device address not set, not installing."
fi