# HG changeset patch # User Christopher Rogers # Date 1310333895 0 # Node ID 0d2c2fa5dc6c6099a767c72d41297bbdd4f7d37b # Parent 35fbd099024d0acd831bd99398a5d85f4fb132c9 tazpkg: Fixed PACKAGE_FILE to not cause '/usr/bin/tazpkg: cd: line 46: can't cd to .' errors. This happened cause dirname just equal '.' if there is no folder in $PACKAGE variable. This fix shouldn't cause any problems anyways. diff -r 35fbd099024d -r 0d2c2fa5dc6c tazpkg --- a/tazpkg Sun Jun 26 08:35:00 2011 +0000 +++ b/tazpkg Sun Jul 10 21:38:15 2011 +0000 @@ -42,8 +42,9 @@ # and actions. COMMAND=$1 PACKAGE=${2%/} -[ -n "$PACKAGE" ] && -PACKAGE_FILE="$(cd $(dirname $PACKAGE) ; pwd)/$(basename $PACKAGE)" +PACKAGE_DIR="$(dirname $PACKAGE)" +[ -n "$PACKAGE" -a "$PACKAGE_DIR" != "." ] && +PACKAGE_FILE="$(cd $PACKAGE_DIR ; pwd)/${PACKAGE##*/}" if [ -f "$PACKAGE" ]; then # Set pkg basename for install, extract PACKAGE=$(basename ${PACKAGE%.tazpkg} 2>/dev/null)