From 89bcb1be0e034758798bf08b5ff1ff9a17a8f1a0 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Mon, 6 Jul 2020 05:44:22 +0000 Subject: [PATCH] Allow scriptlet numbering to be on 4 digits in packInstall.sh* --- pkgmngt/packInstall.sh.dpkg | 2 +- pkgmngt/packInstall.sh.porg | 4 ++-- pkgmngt/packInstall.sh.template | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgmngt/packInstall.sh.dpkg b/pkgmngt/packInstall.sh.dpkg index 70547d9..02d3b74 100644 --- a/pkgmngt/packInstall.sh.dpkg +++ b/pkgmngt/packInstall.sh.dpkg @@ -6,7 +6,7 @@ packInstall() { local PCKGVRS=$(basename $PKGDIR) local TGTPKG=$(basename $PKG_DEST) -local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' | +local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3,4\}-//' | sed 's/^[0-9]\{2\}-//') case $PCKGVRS in expect*|tcl*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*//') ;; diff --git a/pkgmngt/packInstall.sh.porg b/pkgmngt/packInstall.sh.porg index 2e0d0ff..46b1223 100644 --- a/pkgmngt/packInstall.sh.porg +++ b/pkgmngt/packInstall.sh.porg @@ -107,7 +107,7 @@ wrapInstall() { # but it does not hurt, either. local PCKGVRS=$(basename $PKGDIR) local TGTPKG=$(basename $PKG_DEST) -local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' | +local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3,4\}-//' | sed 's/^[0-9]\{2\}-//') # Porg converts package names to lowercase anyway, so do the conversion # ourselves @@ -126,7 +126,7 @@ packInstall() { # With porg, we need only the package name to make the tarball local TGTPKG=$(basename $PKG_DEST) -local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' | +local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3,4\}-//' | sed 's/^[0-9]\{1\}-//') local PCKGVRS=$(basename $PKGDIR) # Porg converts package names to lowercase anyway, so do the conversion diff --git a/pkgmngt/packInstall.sh.template b/pkgmngt/packInstall.sh.template index 866e055..16f8941 100644 --- a/pkgmngt/packInstall.sh.template +++ b/pkgmngt/packInstall.sh.template @@ -8,7 +8,7 @@ packInstall() { # A proposed implementation for versions and package names. local PCKGVRS=$(basename $PKGDIR) local TGTPKG=$(basename $PKG_DEST) -local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' | +local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3,4\}-//' | sed 's/^[0-9]\{2\}-//') # version is only accessible from PKGDIR name. Since the format of the # name is not normalized, several hacks are necessary...