aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-15 10:42:08 +0200
committerOliver Smith <osmith@sysmocom.de>2020-05-15 10:42:08 +0200
commit08b2167352fd051d9d80afce5d5c1cb3aaf8846a (patch)
tree4d9757d9de64b36f2fb175352f63241bd6e20175
parent2c450f3486042a4e0adfe5b773ac7c28f18a7b5e (diff)
shell.sh: new file
-rwxr-xr-xrpm-local/shell.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/rpm-local/shell.sh b/rpm-local/shell.sh
new file mode 100755
index 0000000..5fd4a8e
--- /dev/null
+++ b/rpm-local/shell.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" \
+ bash