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 --- README | 13 ++----------- apts | 8 +++++++- tests/generic-apk | 5 ----- 3 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 tests/generic-apk diff --git a/README b/README index 65ec551..554f32b 100644 --- a/README +++ b/README @@ -1,18 +1,9 @@ Author: Jeff Bilyk Contributor: Natanael Copa -Version: 0.1 +Version: 0.2 APTS is designed to allow testing of either entire repositories of apk packages -or one by one. When an error is encountered, the program exits with an error. +or one by one. After running, a list of failed packages is displayed onscreen. Tests can either be for one or multiple packages, and are scripts that first install needed packages, run a series of commands to insure that the contents of the package work as expected, then remove the packages. The file missing-tests shows current packages that do not have a test file created for them. - -Usage: - -./apts -outputfile - any file/device that you wish to have test results output to -package - optional list of packages to test. If none are specified, all - packages will be tested. If a package is specified that does not - have an associated test file, it will be installed then removed using - apk-tools. 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 )) diff --git a/tests/generic-apk b/tests/generic-apk deleted file mode 100644 index 20602c3..0000000 --- a/tests/generic-apk +++ /dev/null @@ -1,5 +0,0 @@ - if [ $@ = "generic-apk" ]; - then exit 0; - fi - apk_add $@ - apk_del $@ -- cgit v1.2.3