mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
build-package: pre-requisites for Bromite WebView
This commit is contained in:
parent
52d8954d09
commit
ea939d6523
@ -106,6 +106,11 @@ for opt in ${@}; do
|
||||
check_nanodroid
|
||||
;;
|
||||
|
||||
u-bromite )
|
||||
update_indices
|
||||
update_bromite
|
||||
;;
|
||||
|
||||
check )
|
||||
check_nanodroid
|
||||
;;
|
||||
|
@ -87,6 +87,14 @@ am_XDALABS=(xda xda-labs app XDALabs xda-labs)
|
||||
|
||||
gh_AMAZE=(TeamAmaze/AmazeFileManager app Amaze)
|
||||
|
||||
###
|
||||
# Bromite WebView
|
||||
###
|
||||
|
||||
bm_WEBVIEW_arm64=(bromite com.android.webview app BromiteWebView_arm64 arm64-v8a)
|
||||
bm_WEBVIEW_arm=(bromite com.android.webview app BromiteWebView_arm armeabi-v7a)
|
||||
bm_WEBVIEW_x86=(bromite com.android.webview app BromiteWebView_x86 x86)
|
||||
|
||||
###
|
||||
# Files Database (for consistency check)
|
||||
###
|
||||
|
@ -7,7 +7,8 @@
|
||||
REPO_FDROID="https://f-droid.org/repo"
|
||||
REPO_GUARDIAN="https://guardianproject.info/fdroid/repo"
|
||||
REPO_MICROG="https://microg.org/fdroid/repo"
|
||||
REPO_NANOLX="https://www.nanolx.org/fdroid/repo"
|
||||
REPO_NANOLX="https://nanolx.org/fdroid/repo"
|
||||
REPO_BROMITE="https://fdroid-bromite.a3c1.starter-us-west-1.openshiftapps.com/fdroid/repo"
|
||||
|
||||
# check dependencies
|
||||
for dep in xmllint gawk wget curl sha256sum; do
|
||||
@ -34,6 +35,10 @@ update_indices () {
|
||||
echo " ++ Nanolx"
|
||||
INDEX_FILE="${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_NANOLX}).index.xml"
|
||||
wget -q -O "${INDEX_FILE}" "${REPO_NANOLX}/index.xml" || error " failed to update Nanolx repo index"
|
||||
|
||||
echo " ++ Bromite"
|
||||
INDEX_FILE="${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_BROMITE}).index.xml"
|
||||
wget -q -O "${INDEX_FILE}" "${REPO_BROMITE}/index.xml" || error " failed to update Bromite repo index"
|
||||
}
|
||||
|
||||
grab_apk_from_repo () {
|
||||
@ -57,14 +62,25 @@ grab_apk_from_repo () {
|
||||
REPO=${REPO_NANOLX}
|
||||
REPO_P="Nanolx"
|
||||
;;
|
||||
|
||||
bromite )
|
||||
REPO=${REPO_BROMITE}
|
||||
REPO_P="Bromite"
|
||||
;;
|
||||
esac
|
||||
|
||||
DOMAIN="$(awk -F/ '{print $3}' <<< ${REPO})"
|
||||
INDEX_FILE="${CWD}/data/${DOMAIN}.index.xml"
|
||||
|
||||
PKG_NAME="${2}"
|
||||
APK_NAME="$(xmllint --xpath "/fdroid/application[id=\"${PKG_NAME}\"]/package[1]/apkname/text()" ${INDEX_FILE})"
|
||||
SHA_SUM="$(xmllint --xpath "/fdroid/application[id=\"${PKG_NAME}\"]/package[1]/hash/text()" ${INDEX_FILE})"
|
||||
|
||||
if [ -z "${5}" ]; then
|
||||
APK_NAME="$(xmllint --xpath "/fdroid/application[id=\"${PKG_NAME}\"]/package[1]/apkname/text()" ${INDEX_FILE})"
|
||||
SHA_SUM="$(xmllint --xpath "/fdroid/application[id=\"${PKG_NAME}\"]/package[1]/hash/text()" ${INDEX_FILE})"
|
||||
else
|
||||
APK_NAME="$(xmllint --xpath "/fdroid/application[id=\"${PKG_NAME}\"]/package[nativecode=\"${5}\"][1]/apkname/text()" ${INDEX_FILE})"
|
||||
SHA_SUM="$(xmllint --xpath "/fdroid/application[id=\"${PKG_NAME}\"]/package[nativecode=\"${5}\"][1]/hash/text()" ${INDEX_FILE})"
|
||||
fi
|
||||
|
||||
APK_URL="${REPO}/${APK_NAME}"
|
||||
APK_DEST="${CWD}/Full/system/${3}/${4}"
|
||||
|
@ -89,3 +89,9 @@ update_apps () {
|
||||
grab_apk_from_apkmirror ${am_YAHOOWEATHER[@]}
|
||||
grab_apk_from_apkmirror ${am_XDALABS[@]}
|
||||
}
|
||||
|
||||
update_bromite () {
|
||||
grab_apk_from_repo ${bm_WEBVIEW_arm64[@]}
|
||||
grab_apk_from_repo ${bm_WEBVIEW_arm[@]}
|
||||
grab_apk_from_repo ${bm_WEBVIEW_x86[@]}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user