Alias --version and --release

This commit is contained in:
2023-01-06 11:12:39 -05:00
parent 6c65d6cc6e
commit 1690069718
2 changed files with 7 additions and 6 deletions

View File

@@ -13,11 +13,11 @@ printHelp() {
debug "${FUNCNAME[0]}" debug "${FUNCNAME[0]}"
cat <<-'EOF' cat <<-'EOF'
Run and deploy OpenWRT imagebuilder.
USAGE: USAGE:
openwrtbuilder [[OPTION] [VALUE]]... openwrtbuilder [[OPTION] [VALUE]]...
Run and deploy OpenWRT imagebuilder.
OPTIONS OPTIONS
--profile, -p PROFILE --profile, -p PROFILE
--info, -i PROFILE --info, -i PROFILE
@@ -43,11 +43,11 @@ readInput() {
unset RESET unset RESET
if _input=$(getopt -o +r:v:p:i:lb:f:dh -l release:,profile:,info:,list-profiles,builddir:,ssh-upgrade:,ssh-backup:,flash:,reset,debug,help -- "$@"); then if _input=$(getopt -o +r:v:p:i:lb:f:dh -l release:,version:,profile:,info:,list-profiles,builddir:,ssh-upgrade:,ssh-backup:,flash:,reset,debug,help -- "$@"); then
eval set -- "$_input" eval set -- "$_input"
while true; do while true; do
case "$1" in case "$1" in
--release|-r) --release|-r|--version|-v)
shift && RELEASE="$1" shift && RELEASE="$1"
;; ;;
--profile|-p) --profile|-p)
@@ -145,7 +145,7 @@ installHostDependencies() {
_pkg_cmd="apt-get" _pkg_cmd="apt-get"
fi fi
echo "Installing dependencies" debug "Installing dependencies"
debug "sudo $_pkg_cmd -y install ${_pkg_list[*]}" debug "sudo $_pkg_cmd -y install ${_pkg_list[*]}"
if ! sudo "$_pkg_cmd" -y install "${_pkg_list[@]}" > /dev/null 2>&1; then if ! sudo "$_pkg_cmd" -y install "${_pkg_list[@]}" > /dev/null 2>&1; then
echo "Warning: Problem installing dependencies" echo "Warning: Problem installing dependencies"
@@ -192,7 +192,7 @@ getImageBuilder() {
echo "Downloading imagebuilder archive using $_dl_tool" echo "Downloading imagebuilder archive using $_dl_tool"
debug "$_dl_tool -o ${P_ARR[source_archive]} $_url" debug "$_dl_tool -o ${P_ARR[source_archive]} $_url"
if ! "$_dl_tool" -o "${P_ARR[source_archive]}" "$_url" > /dev/null 2>&1; then if ! "$_dl_tool" -o "${P_ARR[source_archive]}" "$_url"; then
echo "Could not download imagebuilder archive" echo "Could not download imagebuilder archive"
exit 1 exit 1
fi fi

View File

@@ -91,6 +91,7 @@ r4s['packages']="\
luci-app-wireguard \ luci-app-wireguard \
luci-app-ddns \ luci-app-ddns \
luci-app-sqm \ luci-app-sqm \
irqbalance \
collectd-mod-sqm \ collectd-mod-sqm \
collectd-mod-df \ collectd-mod-df \
pbr \ pbr \