-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·26 lines (20 loc) · 996 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Clean
rm -fr build
# Assign variables
VERSION=$(xcodebuild -showBuildSettings | grep MARKETING_VERSION | tr -d "MARKETING_VERSION =")
CONTROL="Package: com.eamontracey.nomaepreferences\nName: NomaePreferences\nVersion: $VERSION\nArchitecture: iphoneos-arm\nDescription: A SwiftUI preferences framework\nMaintainer: Eamon Tracey\nAuthor: Eamon Tracey\nSection: System\nDepends: firmware (>= 13.0)"
# Compile NomaePreferences
xcodebuild -scheme NomaePreferences -configuration Release -arch arm64 -arch arm64e -derivedDataPath build
# Prepare for dpkg-deb
cd build/Build/Products/Release-iphoneos
mkdir layout/ layout/DEBIAN/ layout/Library/ layout/Library/Frameworks/
echo $CONTROL > layout/DEBIAN/control
cp -r NomaePreferences.framework layout/Library/Frameworks/
# Build deb
dpkg-deb --build layout
# Move framework and deb
mv NomaePreferences.framework ../../../
mv layout.deb ../../../NomaePreferences-$VERSION.deb
# Clean
cd ../../..
rm -fr Build Logs ModuleCache.noindex info.plist