tazpkg rev 519

tazpkg: Fixed install option to work in current path again. I needed to add a if statement to null $PACKAGE_DIR if it equal '.'. Before it was not assigning $PACKAGE_FILE if $PACKAGE_DIR equal '.' so we didn't get error problems cding to '.'. Also PACKAGE_DIR equals cd $(dirname ) cause cd nothing will go to $HOME.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Aug 08 14:05:03 2011 +0000 (2011-08-08)
parents 573328aaa1e2
children 430a39421421
files tazpkg
line diff
     1.1 --- a/tazpkg	Sat Jul 30 09:58:19 2011 +0000
     1.2 +++ b/tazpkg	Mon Aug 08 14:05:03 2011 +0000
     1.3 @@ -42,9 +42,10 @@
     1.4  # and actions.
     1.5  COMMAND=$1
     1.6  PACKAGE=${2%/}
     1.7 -PACKAGE_DIR="$(dirname $PACKAGE)"
     1.8 -[ -n "$PACKAGE" -a "$PACKAGE_DIR" != "." ] && 
     1.9 -PACKAGE_FILE="$(cd $PACKAGE_DIR ; pwd)/${PACKAGE##*/}"
    1.10 +PACKAGE_DIR="$(cd $(dirname $PACKAGE))"
    1.11 +[ "$PACKAGE_DIR" = "." ] && PACKAGE_DIR=""
    1.12 +[ -n "$PACKAGE" ] && 
    1.13 +PACKAGE_FILE="$($PACKAGE_DIR ; pwd)/${PACKAGE##*/}"
    1.14  if [ -f "$PACKAGE" ]; then
    1.15  	# Set pkg basename for install, extract
    1.16  	PACKAGE=$(basename ${PACKAGE%.tazpkg} 2>/dev/null)