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

145 lines
2.2 KiB
Plaintext
Raw Normal View History

2018-01-23 20:11:52 +00:00
#!/bin/bash
2018-11-13 19:18:00 +00:00
VERSION=20.2.99999999
2018-01-23 20:11:52 +00:00
CWD=$(readlink -m "${BASH_SOURCE[0]}")
CWD=$(dirname "${CWD}")
for funcfile in pkg-full pkg-microg pkg-fdroid \
2018-11-08 17:34:57 +00:00
pkg-misc update common download database \
pkg-bromite; do
2018-01-23 20:11:52 +00:00
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)
2018-09-14 16:57:52 +00:00
check_nanodroid || error "run nanodroid-pull first!"
2018-01-23 20:11:52 +00:00
mk_pkg_full
;;
microg )
2018-09-14 16:57:52 +00:00
check_nanodroid || error "run nanodroid-pull first!"
2018-01-23 20:11:52 +00:00
mk_pkg_microg
;;
fdroid )
2018-09-14 16:57:52 +00:00
check_nanodroid || error "run nanodroid-pull first!"
2018-01-23 20:11:52 +00:00
mk_pkg_fdroid
;;
patcher )
mk_pkg_patcher
;;
uninstaller )
mk_pkg_uninstaller
;;
setupwizard )
mk_pkg_setupwizard
;;
2018-11-08 17:27:34 +00:00
bromitewebview )
2018-11-09 20:18:04 +00:00
check_nanodroid || error "run nanodroid-pull first!"
2018-11-08 17:34:57 +00:00
mk_pkg_bromite_webview
2018-11-08 17:27:34 +00:00
;;
2018-01-23 20:11:52 +00:00
all )
2018-09-14 16:57:52 +00:00
check_nanodroid || error "run nanodroid-pull first!"
2018-01-23 20:11:52 +00:00
mk_pkg_full
mk_pkg_microg
mk_pkg_fdroid
mk_pkg_patcher
mk_pkg_uninstaller
mk_pkg_setupwizard
2018-11-08 17:27:34 +00:00
mk_pkg_bromite_webview
2018-01-23 20:11:52 +00:00
;;
ver )
increase_version_number "${@}"
;;
bump )
increase_module_version
;;
dalvik )
dalvikize_jar "${2}"
;;
pull )
2018-09-15 17:21:52 +00:00
update_indices
2018-01-23 20:11:52 +00:00
nanodroid_pull
check_nanodroid
;;
u-microg )
2018-09-15 17:21:52 +00:00
update_indices
2018-01-23 20:11:52 +00:00
update_microg
2018-09-15 17:21:52 +00:00
check_nanodroid
2018-01-23 20:11:52 +00:00
;;
u-fdroid )
2018-09-15 17:21:52 +00:00
update_indices
2018-01-23 20:11:52 +00:00
update_fdroid
2018-09-15 17:21:52 +00:00
check_nanodroid
2018-01-23 20:11:52 +00:00
;;
u-apps )
2018-09-15 17:21:52 +00:00
update_indices
2018-01-23 20:11:52 +00:00
update_apps
2018-09-15 17:21:52 +00:00
check_nanodroid
2018-01-23 20:11:52 +00:00
;;
u-swipe )
update_swipe
2018-09-15 17:21:52 +00:00
check_nanodroid
2018-01-23 20:11:52 +00:00
;;
u-gsync )
update_gsync
2018-09-15 17:21:52 +00:00
check_nanodroid
2018-01-23 20:11:52 +00:00
;;
u-bromite )
update_indices
update_bromite
;;
2018-01-23 20:11:52 +00:00
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