# HG changeset patch # User Christopher Rogers # Date 1312812303 0 # Node ID 634147c165786b5186f8f44d8364113bc44b8531 # Parent 573328aaa1e27055cba894b207f665422a3cef3e 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. diff -r 573328aaa1e2 -r 634147c16578 tazpkg --- a/tazpkg Sat Jul 30 09:58:19 2011 +0000 +++ b/tazpkg Mon Aug 08 14:05:03 2011 +0000 @@ -42,9 +42,10 @@ # and actions. COMMAND=$1 PACKAGE=${2%/} -PACKAGE_DIR="$(dirname $PACKAGE)" -[ -n "$PACKAGE" -a "$PACKAGE_DIR" != "." ] && -PACKAGE_FILE="$(cd $PACKAGE_DIR ; pwd)/${PACKAGE##*/}" +PACKAGE_DIR="$(cd $(dirname $PACKAGE))" +[ "$PACKAGE_DIR" = "." ] && PACKAGE_DIR="" +[ -n "$PACKAGE" ] && +PACKAGE_FILE="$($PACKAGE_DIR ; pwd)/${PACKAGE##*/}" if [ -f "$PACKAGE" ]; then # Set pkg basename for install, extract PACKAGE=$(basename ${PACKAGE%.tazpkg} 2>/dev/null)