From 8fa277b944079fc882d2b7c6aeb7128448a24ec5 Mon Sep 17 00:00:00 2001 From: Jeff Bilyk Date: Thu, 30 Dec 2010 18:14:50 +0000 Subject: apts: fix bug with trailing slash on outdir and misc other fixes fix bug with trailing slash on outdir and misc others --- apts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apts') diff --git a/apts b/apts index 8cb4ccb..033b11b 100755 --- a/apts +++ b/apts @@ -4,6 +4,7 @@ # In theory, it will work on any distribution that uses the apk-tools # package manager # Author: Jeff Bilyk +# Contributor: Natanael Copa # Version History available at http://git.alpinelinux.org/cgit/apts/ # Get file to output to @@ -14,7 +15,7 @@ usage() { exit 1 } -# dont not halt on fail by default +# do not halt on fail by default halt_on_fail= # default outdir is current working dir @@ -43,6 +44,11 @@ while getopts "d:eho:" opt; do esac done +# Remove trailing slash from outdir +if ! [ $outdir == "$PWD" ]; then + outdir=`echo "$outdir" | sed "s,/$,,"`; +fi + #remove opts so that package(s) is $@ shift $(( $OPTIND - 1 )) -- cgit v1.2.3