diff options
author | Jeff Bilyk <jbilyk@gmail.com> | 2010-12-30 18:14:50 +0000 |
---|---|---|
committer | Jeff Bilyk <jbilyk@gmail.com> | 2010-12-30 18:14:50 +0000 |
commit | 8fa277b944079fc882d2b7c6aeb7128448a24ec5 (patch) | |
tree | 54f30c72e2bfe521483221ea3d146b8d828a7d9c /apts | |
parent | 5b9b638e7663b8906a24d5e2f4c805dd8ab43e1e (diff) | |
download | apts-8fa277b944079fc882d2b7c6aeb7128448a24ec5.tar.bz2 apts-8fa277b944079fc882d2b7c6aeb7128448a24ec5.tar.xz |
apts: fix bug with trailing slash on outdir and misc other fixesv0.2
fix bug with trailing slash on outdir and misc others
Diffstat (limited to 'apts')
-rwxr-xr-x | apts | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4,6 +4,7 @@ # In theory, it will work on any distribution that uses the apk-tools # package manager # Author: Jeff Bilyk <jbilyk@gmail.com> +# Contributor: Natanael Copa <ncopa@alpinelinux.org> # 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 )) |