|
@@ -0,0 +1,70 @@
|
|
|
+#!/bin/bash
|
|
|
+
|
|
|
+# this script assumes that in
|
|
|
+# ~/bromite ---> there is the bromite repo
|
|
|
+# ~/chromium ---> there is the chromium repo
|
|
|
+
|
|
|
+RED='\033[0;31m'
|
|
|
+NC='\033[0m' # No Color
|
|
|
+
|
|
|
+cd ~
|
|
|
+
|
|
|
+echo -e ${RED} -------- download bromite repo ${NC}
|
|
|
+mkdir ~/bromite
|
|
|
+cd ~/bromite
|
|
|
+git fetch
|
|
|
+git pull
|
|
|
+
|
|
|
+VERSION=$( cat ~/bromite/build/RELEASE )
|
|
|
+echo -e ${RED} -------- lastest version is: $VERSION ${NC}
|
|
|
+
|
|
|
+
|
|
|
+echo -e ${RED} -------- download chromium repo ${NC}
|
|
|
+mkdir ~/chromium
|
|
|
+cd ~/chromium
|
|
|
+fetch --nohooks --no-history android
|
|
|
+
|
|
|
+
|
|
|
+cd src
|
|
|
+
|
|
|
+# cleanup repo!
|
|
|
+git reset
|
|
|
+git reset --hard HEAD
|
|
|
+git clean -fdx
|
|
|
+git fetch --depth 2 https://chromium.googlesource.com/chromium/src.git +refs/tags/$VERSION:chromium_$VERSION
|
|
|
+git tag
|
|
|
+git checkout .
|
|
|
+git clean -fdx
|
|
|
+git checkout $VERSION
|
|
|
+
|
|
|
+echo -e ${RED} -------- git current status ${NC}
|
|
|
+git status
|
|
|
+git log
|
|
|
+
|
|
|
+echo -e ${RED} -------- sync other chromium repos ${NC}
|
|
|
+gclient sync -D
|
|
|
+
|
|
|
+# remove origin for chromium
|
|
|
+git remote remove origin
|
|
|
+
|
|
|
+echo -e ${RED} ------- apply patchs ${NC}
|
|
|
+for file in $(cat ~/bromite/build/patches_list.txt) ; do
|
|
|
+ echo -e ${RED} " -> Apply $file" ${NC}
|
|
|
+
|
|
|
+ REPL="0,/^---/s//FILE:"$file"\n---/"
|
|
|
+ cat ~/bromite/build/patches/$file | sed $REPL | git am
|
|
|
+
|
|
|
+ echo " "
|
|
|
+done
|
|
|
+
|
|
|
+# install builds deps
|
|
|
+sudo build/install-build-deps-android.sh
|
|
|
+gclient runhooks
|
|
|
+
|
|
|
+# generate ninja files and autogenerated files
|
|
|
+gn gen --args="$(cat ~/bromite/build/GN_ARGS) target_cpu=\"arm64\" " out/arm64
|
|
|
+
|
|
|
+# build time!
|
|
|
+date
|
|
|
+autoninja -C out/arm64 chrome_modern_public_apk
|
|
|
+date
|