Skip to content

Commit

Permalink
Merge pull request #220 from icy/release-v3.0.7
Browse files Browse the repository at this point in the history
v3.0.7: minor fixes
  • Loading branch information
icy authored Jan 6, 2022
2 parents 09f5174 + 2129280 commit 20bcff2
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v3.0.7

* `lib/{apk,macports,pkgng}`: Fixed fetch option #214
* `lib/portage`: Fixed syntax error #218 (Thanks @owl4ce)

## v3.0.6

* New support `Void Linux` (Thanks Tabulate @TabulateJarl8)
Expand Down
2 changes: 1 addition & 1 deletion lib/apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ apk_S() {
# shellcheck disable=2086
case ${_EOPT} in
# Download only
("fetch") shift
(fetch*) shift
apk fetch $_TOPT "$@" ;;
(*) apk add $_TOPT "$@" ;;
esac
Expand Down
10 changes: 7 additions & 3 deletions lib/macports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ macports_Scc() {
}

macports_S() {
if [ "$_TOPT" = "fetch" ]; then
# shellcheck disable=SC2153
case "$_EOPT" in
fetch*)
shift
port patch "$@"
else
;;
*)
port install "$@"
fi
;;
esac
}
9 changes: 6 additions & 3 deletions lib/pkgng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ pkgng_Scc() {

pkgng_S() {
# shellcheck disable=SC2153
if [ "$_EOPT" = "fetch" ]; then
case "$_EOPT" in
fetch*)
shift
pkg fetch "$@"
else
;;
*)
pkg install "$@"
fi
;;
esac
}
39 changes: 25 additions & 14 deletions pacapt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Purpose: A wrapper for all Unix package managers
# License: Fair license (http://www.opensource.org/licenses/fair)
# Source : http://github.com/icy/pacapt/
# Version: 3.0.6
# Version: 3.0.7
# Authors: Anh K. Huynh et al.

# Copyright (C) 2010 - 2022 \
Expand Down Expand Up @@ -47,7 +47,7 @@

_print_pacapt_version() {
cat <<_EOF_
pacapt version '3.0.6'
pacapt version '3.0.7'
Copyright (C) 2010 - 2022 \\
| 10sr (@10sr)
Expand Down Expand Up @@ -89,7 +89,7 @@ DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
_EOF_
}

export PACAPT_VERSION='3.0.6'
export PACAPT_VERSION='3.0.7'

_help() {
cat <<'EOF'
Expand Down Expand Up @@ -416,8 +416,10 @@ _translate_all() {

local_debug="$(_translate_debug)" || return 1
local_noconfirm="$(_translate_noconfirm)" || return 1
local_args="$(_translate_w)" || return 1

# WARNING: Order does matter, see also
# https://github.com/icy/pacapt/pull/219#issuecomment-1006079629
local_args="$(_translate_w)" || return 1
local_args="${local_args}${local_noconfirm:+ }${local_noconfirm}"
local_args="${local_args}${local_debug:+ }${local_debug}"

Expand Down Expand Up @@ -595,9 +597,9 @@ apk_S() {
# shellcheck disable=2086
case ${_EOPT} in
# Download only
("fetch") shift
apk fetch $_TOPT -- "$@" ;;
(*) apk add $_TOPT -- "$@" ;;
(fetch*) shift
apk fetch $_TOPT "$@" ;;
(*) apk add $_TOPT "$@" ;;
esac
}

Expand Down Expand Up @@ -1375,11 +1377,16 @@ macports_Scc() {
}

macports_S() {
if [ "$_TOPT" = "fetch" ]; then
# shellcheck disable=SC2153
case "$_EOPT" in
fetch*)
shift
port patch "$@"
else
;;
*)
port install "$@"
fi
;;
esac
}


Expand Down Expand Up @@ -1580,11 +1587,15 @@ pkgng_Scc() {

pkgng_S() {
# shellcheck disable=SC2153
if [ "$_EOPT" = "fetch" ]; then
case "$_EOPT" in
fetch*)
shift
pkg fetch "$@"
else
;;
*)
pkg install "$@"
fi
;;
esac
}


Expand Down Expand Up @@ -1779,7 +1790,7 @@ portage_Rs() {
}

portage_R() {
emerge --depclean "@"
emerge --depclean "$@"
}

portage_Si() {
Expand Down
3 changes: 3 additions & 0 deletions tests/apk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ in -Sy
ou ^(fetch|OK)

# Download package
in -Swv nano
ou Downloading nano

in -Sw screen
ou ^Downloading screen

Expand Down

0 comments on commit 20bcff2

Please sign in to comment.