summaryrefslogtreecommitdiffstats
path: root/apts
diff options
context:
space:
mode:
Diffstat (limited to 'apts')
-rwxr-xr-xapts8
1 files changed, 7 insertions, 1 deletions
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 <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 ))