2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

build-package: simplify

This commit is contained in:
Christopher Roy Bratusek 2020-09-25 09:44:01 +02:00
parent 71bc295636
commit b30cba7c2b

View File

@ -35,43 +35,38 @@ gzip_apk () {
echo "error downloading ${1}" echo "error downloading ${1}"
} }
msg_no_checksum () {
echo " Checking SHA256 hash not supported"
}
msg_apk_update () {
if [ -f "${1}.gz" ]; then
echo -e "\nUpdating from ${2} : $(basename ${1}) ${3}"
else echo -e "\nDownloading from ${2} : $(basename ${1}) ${3}"
fi
}
msg_download_info () { msg_download_info () {
case ${1} in case ${1} in
sideload) sideload)
echo -e "\nSideloading APK : ${2} ${3}" echo -e "\nSideloading APK : ${2} ${3}"
echo " Checking SHA256 hash not supported" msg_no_checksum
;; ;;
github) github)
if [ -f "${2}.gz" ]; then msg_apk_update "${2}" "GitHub"
echo -e "\nUpdating from GitHub : $(basename ${2})" msg_no_checksum
else echo -e "\nDownloading from GitHub : $(basename ${2})"
fi
echo " Checking SHA256 hash not supported"
;; ;;
gitlab) gitlab)
if [ -f "${2}.gz" ]; then msg_apk_update "${2}" "GitLab"
echo -e "\nUpdating from GitLab : $(basename ${2})" msg_no_checksum
else echo -e "\nDownloading from GitLab : $(basename ${2})"
fi
echo " Checking SHA256 hash not supported"
;; ;;
opengapps) opengapps)
if [ -f "${2}.gz" ]; then msg_apk_update "${2}" "OpenGApps" "${3}"
echo -e "\nUpdating from OpenGApps : $(basename ${2}) ${3}" msg_no_checksum
else echo -e "\nDownloading from OpenGApps: $(basename ${2}) ${3}"
fi
echo " Checking SHA256 hash not supported"
;; ;;
url) url)
if [ -f "${2}.gz" ]; then msg_apk_update "${2}" "URL"
echo -e "\nUpdating from URL : $(basename ${2})" msg_no_checksum
else echo -e "\nDownloading from URL : $(basename ${2})"
fi
echo " Checking SHA256 hash not supported"
;; ;;
esac esac
} }