2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00
NanoDroid/build-package
Christopher Roy Bratusek 222d224f20 fix typo in version number
2019-07-26 22:02:38 +02:00

165 lines
2.4 KiB
Bash
Executable File

#!/bin/bash
VERSION=22.1.20190726
CWD=$(readlink -m "${BASH_SOURCE[0]}")
CWD=$(dirname "${CWD}")
for funcfile in pkg update common download database; do
source "${CWD}/data/build-package.${funcfile}" || exit 1
done
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! [ -x "$(command -v brew)" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if ! [ -x "$(command -v gsed)" ]; then
brew install gnu-sed
fi
alias sed=gsed
fi
[[ -z ${1} ]] && show_help
for opt in ${@}; do
case ${opt} in
full)
check_nanodroid || error "run nanodroid-pull first!"
mk_pkg_full
;;
microg )
check_nanodroid || error "run nanodroid-pull first!"
mk_pkg_microg
;;
fdroid )
check_nanodroid || error "run nanodroid-pull first!"
mk_pkg_fdroid
;;
patcher )
mk_pkg_patcher
;;
uninstaller )
mk_pkg_uninstaller
;;
setupwizard )
mk_pkg_setupwizard
;;
bromitewebview )
check_nanodroid || error "run nanodroid-pull first!"
mk_pkg_bromite_webview
;;
osmand )
check_nanodroid || error "run nanodroid-pull first!"
mk_pkg_osmand
;;
systest )
mk_pkg_systest
;;
all )
check_nanodroid || error "run nanodroid-pull first!"
mk_pkg_full
mk_pkg_microg
mk_pkg_fdroid
mk_pkg_patcher
mk_pkg_uninstaller
mk_pkg_setupwizard
mk_pkg_bromite_webview
mk_pkg_osmand
mk_pkg_systest
;;
ver )
increase_version_number "${@}"
;;
bump )
increase_module_version
;;
dalvik )
dalvikize_jar "${2}"
;;
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
;;
u-bromite )
update_indices
update_bromite
check_nanodroid
;;
u-osmand )
update_indices
update_osmand
check_nanodroid
;;
u-patch )
update_patches
;;
check )
check_nanodroid
;;
clean )
echo -ne "\nAre you sure to delete all untracked files?\n >> enter [y] or [j] to continue: "
read -r user_input
case "${user_input}" in
y | Y | j | J )
git clean -fd
;;
* )
echo "aborted"
;;
esac
;;
* )
show_help
;;
esac
done