mkpk

Систем за управљање пакетима који користи mk из система Plan9
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 21ff8bad793e1fae7b5b6449754a0354c7026656
родитељ 674a5ab58bc7b2057a1206b9395dc359efc43247
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Thu,  4 Aug 2022 11:43:16 +0200

Be more specific when searching for packages

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
Mlib/install.mk | 4++--
Mlib/listfiles.mk | 4++--
Mlib/uninstall.mk | 4++--
измењених датотека: 3, додавања: 6(+), брисања: 6(-)

diff --git a/lib/install.mk b/lib/install.mk @@ -1,8 +1,8 @@ <$mkpklib/defaults.mk install-package:QV: - recentver=$(find ${PKGDIR}/* -type f -prune -name "${PKGBASE}-*" | \ - sed 's,\([^0-9]\+[^-]-\)\+\([0-9].*\)\.tar\.xz,\2,' | recent) + recentver=$(find ${PKGDIR}/ -type f -prune -name "${PKGBASE}-*.tar.xz" \ + | sed 's,\([^0-9]\+[^-]-\)\+\([0-9].*\)\.tar\.xz,\2,' | recent) if [ -z "${recentver}" ]; then printf "Cannot find package %s\n" "${PKGBASE}" >&2 exit 1 diff --git a/lib/listfiles.mk b/lib/listfiles.mk @@ -1,8 +1,8 @@ <$mkpklib/defaults.mk listfiles:QV: - recentver=$(find ${PKGDIR}/* -type f -prune -name "${PKGBASE}-*" | \ - sed 's,\([^0-9]\+[^-]-\)\+\([0-9].*\)\.tar\.xz,\2,' | recent) + recentver=$(find ${PKGDIR}/ -type f -prune -name "${PKGBASE}-*.tar.xz" \ + | sed 's,\([^0-9]\+[^-]-\)\+\([0-9].*\)\.tar\.xz,\2,' | recent) if [ -z "${recentver}" ]; then printf "Cannot find package %s" "$PKGBASE" >&2 else diff --git a/lib/uninstall.mk b/lib/uninstall.mk @@ -1,8 +1,8 @@ <$mkpklib/defaults.mk uninstall-package:QV: - recentver=$(find ${PKGDIR}/* -type f -prune -name "${PKGBASE}-*" | \ - sed 's,\([^0-9]\+[^-]-\)\+\([0-9].*\)\.tar\.xz,\2,' | recent) + recentver=$(find ${PKGDIR}/ -type f -prune -name "${PKGBASE}-*.tar.xz" \ + | sed 's,\([^0-9]\+[^-]-\)\+\([0-9].*\)\.tar\.xz,\2,' | recent) if [ -z "${recentver}" ]; then printf "Cannot find package %s\n" "${PKGBASE}" >&2 exit 1