tazpkg rev 427
tazpkg: remove trailing / in package name
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Mar 01 22:24:48 2011 +0100 (2011-03-01) |
parents | 3a8fccb4e5f7 |
children | 0bc0cd627417 |
files | tazpkg |
line diff
1.1 --- a/tazpkg Tue Mar 01 18:42:38 2011 +0100 1.2 +++ b/tazpkg Tue Mar 01 22:24:48 2011 +0100 1.3 @@ -41,14 +41,15 @@ 1.4 # Initialize some variables to use words rather than numbers for functions 1.5 # and actions. 1.6 COMMAND=$1 1.7 -if [ -f "$2" ]; then 1.8 +PACKAGE=${2%/} 1.9 +PACKAGE_FILE="$PWD/$PACKAGE" 1.10 +if [ -f "$PACKAGE" ]; then 1.11 # Set pkg basename for install, extract 1.12 - PACKAGE=$(basename ${2%.tazpkg} 2>/dev/null) 1.13 + PACKAGE=$(basename ${PACKAGE%.tazpkg} 2>/dev/null) 1.14 else 1.15 # Pkg name for remove, search and all other cmds 1.16 - PACKAGE=${2%.tazpkg} 1.17 + PACKAGE=${PACKAGE%.tazpkg} 1.18 fi 1.19 -PACKAGE_FILE="$PWD/$2" 1.20 TARGET_DIR=$3 1.21 TOP_DIR=`pwd` 1.22 TMP_DIR=$tmp/$RANDOM