mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
improve build-package
This commit is contained in:
parent
8f6a1b2886
commit
20f472d5b7
@ -73,28 +73,37 @@ for opt in ${@}; do
|
||||
;;
|
||||
|
||||
pull )
|
||||
update_indices
|
||||
nanodroid_pull
|
||||
check_nanodroid
|
||||
;;
|
||||
|
||||
u-microg )
|
||||
update_indices
|
||||
update_microg
|
||||
check_nanodroid
|
||||
;;
|
||||
|
||||
u-fdroid )
|
||||
update_indices
|
||||
update_fdroid
|
||||
check_nanodroid
|
||||
;;
|
||||
|
||||
u-apps )
|
||||
update_indices
|
||||
update_apps
|
||||
check_nanodroid
|
||||
;;
|
||||
|
||||
u-swipe )
|
||||
update_swipe
|
||||
check_nanodroid
|
||||
;;
|
||||
|
||||
u-gsync )
|
||||
update_gsync
|
||||
check_nanodroid
|
||||
;;
|
||||
|
||||
check )
|
||||
|
@ -58,6 +58,12 @@ fd_TERMUX=(fdroid com.termux app Termux)
|
||||
gd_ORBOT=(guardian org.torproject.android app Orbot)
|
||||
gd_ORFOX=(guardian info.guardianproject.orfox app Orfox)
|
||||
|
||||
|
||||
TORBROWSER_APK=$(wget -O- https://www.torproject.org/projects/torbrowser.html.en 2>/dev/null | \
|
||||
gawk -F\" '/apk.*Android/{print $2}' | \
|
||||
sed 's|..|https://www.torproject.org|')
|
||||
tp_TORBROWSER=(${TORBROWSER_APK} app TorBrowser)
|
||||
|
||||
gh_AMAZE=(TeamAmaze/AmazeFileManager app Amaze)
|
||||
gh_K9MAIL=(k9mail/k-9 app K9Mail)
|
||||
gh_MPV=(mpv-android/mpv-android app MPV)
|
||||
@ -134,12 +140,12 @@ files_database=( Full/gsync/K/app/GoogleCalendarSync/GoogleCalendarSync.apk
|
||||
Full/system/app/OpenVPN/OpenVPN.apk
|
||||
Full/system/app/OpenWeatherMapProvider/OpenWeatherMapProvider.apk
|
||||
Full/system/app/Orbot/Orbot.apk
|
||||
Full/system/app/Orfox/Orfox.apk
|
||||
Full/system/app/QKSMS/QKSMS.apk
|
||||
Full/system/app/SimpleCalendar/SimpleCalendar.apk
|
||||
Full/system/app/SimpleGallery/SimpleGallery.apk
|
||||
Full/system/app/Substratum/Substratum.apk
|
||||
Full/system/app/Termux/Termux.apk
|
||||
Full/system/app/TorBrowser/TorBrowser.apk
|
||||
Full/system/app/Twidere/Twidere.apk
|
||||
Full/system/app/XDALabs/XDALabs.apk
|
||||
Full/system/app/YahooWeatherProvider/YahooWeatherProvider.apk
|
||||
|
@ -16,6 +16,22 @@ for dep in xmllint gawk wget curl sha256sum; do
|
||||
fi
|
||||
done
|
||||
|
||||
update_indices () {
|
||||
echo "+++ upating Repo Indices"
|
||||
echo " ++ F-Droid"
|
||||
REPO=${REPO_FDROID}
|
||||
INDEX_FILE="${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_FDROID}).index.xml"
|
||||
wget -q -O "${INDEX_FILE}" "${REPO_FDROID}/index.xml" || error " failed to update F-Droid repo index"
|
||||
|
||||
echo " ++ Guardian Project"
|
||||
INDEX_FILE="${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_GUARDIAN}).index.xml"
|
||||
wget -q -O "${INDEX_FILE}" "${REPO_GUARDIAN}/index.xml" || error " failed to update Guardian Project repo index"
|
||||
|
||||
echo " ++ microG"
|
||||
INDEX_FILE="${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_MICROG}).index.xml"
|
||||
wget -q -O "${INDEX_FILE}" "${REPO_MICROG}/index.xml" || error " failed to update microG repo index"
|
||||
}
|
||||
|
||||
grab_apk_from_repo () {
|
||||
case "${1}" in
|
||||
fdroid )
|
||||
@ -37,8 +53,6 @@ grab_apk_from_repo () {
|
||||
DOMAIN="$(awk -F/ '{print $3}' <<< ${REPO})"
|
||||
INDEX_FILE="${CWD}/data/${DOMAIN}.index.xml"
|
||||
|
||||
wget -q -O "${INDEX_FILE}" "${REPO}/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})"
|
||||
|
@ -68,7 +68,8 @@ update_apps () {
|
||||
grab_apk_from_repo ${fd_SIMPLEGALLERY[@]}
|
||||
grab_apk_from_repo ${fd_TERMUX[@]}
|
||||
grab_apk_from_repo ${gd_ORBOT[@]}
|
||||
grab_apk_from_repo ${gd_ORFOX[@]}
|
||||
#grab_apk_from_repo ${gd_ORFOX[@]}
|
||||
grab_apk_from_url ${tp_TORBROWSER[@]}
|
||||
|
||||
# applications not managed in repositories
|
||||
# plain URL
|
||||
|
Loading…
Reference in New Issue
Block a user