aboutsummaryrefslogtreecommitdiffstats
path: root/rpm-local/install_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rpm-local/install_test.sh')
-rwxr-xr-xrpm-local/install_test.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/rpm-local/install_test.sh b/rpm-local/install_test.sh
new file mode 100755
index 0000000..0aa04ee
--- /dev/null
+++ b/rpm-local/install_test.sh
@@ -0,0 +1,20 @@
+#!/bin/sh -ex
+DIR="$(cd "$(dirname "$0")" && pwd -P)"
+IMAGE="centos8"
+
+if ! [ -e ".build.docker.$IMAGE" ]; then
+ echo "ERROR: run build.sh first, to generate the docker img"
+ exit 1
+fi
+
+
+docker run \
+ -it \
+ --rm \
+ -v "$DIR/rpmbuild:/home/user/rpmbuild" \
+ -v "$DIR/scripts:/scripts" \
+ -v "$DIR/cache/$IMAGE/dnf:/var/cache/dnf" \
+ -v "$DIR/cache/yum_repos:/root/yum_repos" \
+ -v "$DIR/cache/distfiles:/home/user/distfiles" \
+ "$IMAGE:latest" \
+ /scripts/install_test.sh