30 lines
614 B
Bash
30 lines
614 B
Bash
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
# Clean repo
|
||
|
cd ./mozilla-unified
|
||
|
git reset --hard
|
||
|
git clean -fd
|
||
|
|
||
|
# Prepare assets
|
||
|
mkdir -p snowleopard
|
||
|
cp ../assets/mozconfig mozconfig
|
||
|
cp ../assets/{local-settings.js,prefs.js,policies.json,moz.build,userChrome.css,userContent.css} snowleopard/
|
||
|
|
||
|
# Set up crossbuild
|
||
|
echo "" >> mozconfig
|
||
|
echo "ac_add_options --target=aarch64-apple-darwin" >> mozconfig
|
||
|
echo "ac_add_options --enable-bootstrap" >> mozconfig
|
||
|
|
||
|
# Prepare patches
|
||
|
for patch in ../patches/*.patch; do
|
||
|
echo "Applying $(basename "$patch")"
|
||
|
git apply "$patch"
|
||
|
done
|
||
|
|
||
|
# Build the thing
|
||
|
./mach build
|
||
|
|
||
|
# Package the thing
|
||
|
./mach package
|