summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-11-30 19:22:54 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-11-30 19:22:54 +0100
commitceabaaa1f96eeb433a0530dc8f9d590bc57aa161 (patch)
treee0c64fca2dad2de586ee025497d349954b9e000e /test/integration
parenta02f24e046d58b723a9283211cb558605a024bdf (diff)
downloadapt-ceabaaa1f96eeb433a0530dc8f9d590bc57aa161.tar.gz
add usage info for create-test-data script
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/create-test-data10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/create-test-data b/test/integration/create-test-data
index ff9405502..b93218b7c 100755
--- a/test/integration/create-test-data
+++ b/test/integration/create-test-data
@@ -1,6 +1,11 @@
#!/bin/sh
set +e # its okay to fail in these script, most of the time the apt* stuff will generate errors
+if [ -z "$1" -o -z "$2" ]; then
+ echo "Usage: $0 file codename pkg…"
+ exit 1
+fi
+
local TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
BUILDDIRECTORY="${TESTDIR}/../../build/bin"
@@ -16,6 +21,11 @@ TMPGEN=$WORKDIR/Packages
export LANG=C
LISTOFPKGS=$(aptget install $* -t $CODENAME -so Dir::state::status=$WORKDIR/status -o Dir::Cache::archives=$WORKDIR -o pkgCacheGen::Essential=none -o APT::Immediate-Configure=0 2> /dev/null | awk '/^Inst/ {print $2}' | sed -e "s#\$#/$CODENAME#")
+if [ -z "$LISTOFPKGS" ]; then
+ echo "List of packages is empty: run apt-get install command again for you now"
+ aptget install $* -t $CODENAME -so Dir::state::status=$WORKDIR/status -o Dir::Cache::archives=$WORKDIR -o pkgCacheGen::Essential=none -o APT::Immediate-Configure=0
+ exit 1
+fi
aptcache show $LISTOFPKGS --no-all-versions 2> /dev/null > $TMPGEN
sed -i $TMPGEN \
-e '/^ / d' \