X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fhv-utilities%2Ftarbz2;h=e7a6d93b23c49a7db91c7a89f0299ec662e412d2;hb=7f1a3e5d69d0b1d64619604c30243e0070dc09ad;hp=cec3194034ec27d7f9a0e7e80a754587b49c3715;hpb=5d494ebc6690e09f6dd2b69bb29e9aa1dbee97df;p=hvlinux.git diff --git a/stage2/hv-utilities/tarbz2 b/stage2/hv-utilities/tarbz2 index cec3194..e7a6d93 100755 --- a/stage2/hv-utilities/tarbz2 +++ b/stage2/hv-utilities/tarbz2 @@ -11,7 +11,8 @@ if [ $# -ne 1 ]; then exit 1 fi -DIR=${1} +DIR=${1%/} +BASE=$(basename ${DIR}) # Checking if directory exists. if [ ! -d ${DIR} ]; then @@ -20,6 +21,6 @@ if [ ! -d ${DIR} ]; then fi # Decompressing file to standard output and piping result to bzip2 -tar cvf - ${DIR} | bzip2 -9 > ${DIR}.tar.bz2 +tar cvf - ${DIR} | bzip2 -9 > ${BASE}.tar.bz2 exit $?