Refine personal profiles

This commit is contained in:
2020-05-09 10:22:34 -04:00
parent 188421eccd
commit c8ff4ae2cf

View File

@@ -19,17 +19,20 @@ setDefaults() {
# If no profile is specified, use the TP-Link Archer C7 v2 # If no profile is specified, use the TP-Link Archer C7 v2
[[ -z $_profile ]] && _profile="tplink_archer-c7-v2" [[ -z $_profile ]] && _profile="tplink_archer-c7-v2"
# PROFILES # Custom profiles
# TP-Link Archer C7 v2 # TP-Link Archer C7 v2 dumb AP
if [[ "$_profile" == "tplink_archer-c7-v2" ]]; then if [[ -z $_target ]]; then
[[ -z $_version ]] && _version="19.07.2" if [[ "$_profile" == "tplink_archer-c7-v2" ]]; then
[[ -z $_target ]] && _target="ath79/generic" [[ -z $_version ]] && _version="19.07.2"
# Raspberry Pi 4 [[ -z $_target ]] && _target="ath79/generic"
elif [[ "$_profile" == "rpi-4" ]]; then _packages+=("-dnsmasq" "-odhcpd")
[[ -z $_version ]] && _version="snapshot" # Raspberry Pi 4B router with USB->Ethernet dongle
[[ -z $_target ]] && _target="bcm27xx/bcm2711" elif [[ "$_profile" == "rpi-4" ]]; then
_packages+=("kmod-usb-net-asix-ax88179" "luci-app-upnp" "luci-app-wireguard" \ [[ -z $_version ]] && _version="snapshot"
"luci-app-vpn-policy-routing" "-dnsmasq" "dnsmasq-full" "luci-app-ddns") [[ -z $_target ]] && _target="bcm27xx/bcm2711"
_packages+=("kmod-usb-net-asix-ax88179" "luci-app-upnp" "luci-app-wireguard" \
"luci-app-vpn-policy-routing" "-dnsmasq" "dnsmasq-full" "luci-app-ddns")
fi
fi fi
} }
@@ -43,7 +46,9 @@ printHelpAndExit() {
cat <<-'EOF' cat <<-'EOF'
USAGE: USAGE:
buildOpenWRT [[OPTION] [VALUE]]... openwrtBuild [[OPTION] [VALUE]]...
If PROFILE is set and TARGET is not, buildOpenwrt can use a custom profile specified in DEFAULTS
OPTIONS OPTIONS
--version, -v OPENWRT_VERSION --version, -v OPENWRT_VERSION