From 9bfe108fb71b82926afb9f6dfad0cf02f6be998f Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 6 Apr 2007 02:51:58 +0000 Subject: function slash changed to common.sh git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@284 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 7 +++++++ trunk/src/lspkg | 2 ++ trunk/src/templatepkg | 7 ------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index f66e9a7..af76cd1 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -505,3 +505,10 @@ function set_jail_perms { } +function slash { + + # remove additional slashes + echo $1 | sed -e 's/\/\+/\//g' + +} + diff --git a/trunk/src/lspkg b/trunk/src/lspkg index 52b808a..74ed684 100755 --- a/trunk/src/lspkg +++ b/trunk/src/lspkg @@ -59,6 +59,8 @@ else LIST_PKGS=`ls /$ROOT/var/log/packages/ 2> /dev/null` fi +LIST_PKGS="`slash $LIST_PKGS`" + case $1 in "-h"|"--help") usage diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index aba8385..96c1d70 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -665,13 +665,6 @@ function setroot { } -function slash { - - # remove additional slashes - echo $1 | sed -e 's/\/\+/\//g' - -} - # ----------------------------------------------------- # main # ----------------------------------------------------- -- cgit v1.2.3