aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh4
-rwxr-xr-xmanage_repository.sh11
-rwxr-xr-xtestrun.sh7
3 files changed, 18 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 6d733c3..b399863 100755
--- a/build.sh
+++ b/build.sh
@@ -1,5 +1,5 @@
#!/bin/bash
docker pull archlinux:base-devel
-#docker build --no-cache -t archpkg .
-docker build -t archpkg .
+#docker build --no-cache -t archpkg docker/
+docker build -t archpkg docker/
diff --git a/manage_repository.sh b/manage_repository.sh
new file mode 100755
index 0000000..395c263
--- /dev/null
+++ b/manage_repository.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Custom_local_repository
+
+OUTDIR="testrun/db/"
+PKGDIR="testrun/db/"
+
+mkdir -p "$OUTDIR"
+
+repo-add -n "$OUTDIR/repo.db.tar.gz" "$PKGDIR/pkgout/*.pkg.*"
+
+rm "$OUTDIR/*.old"
diff --git a/testrun.sh b/testrun.sh
index 774962d..b8caf37 100755
--- a/testrun.sh
+++ b/testrun.sh
@@ -2,11 +2,14 @@
mkdir -p testrun/pkgout
+CHOWN_TO="$USER"
+OUTPUT="$(pwd)/testrun/pkgout"
+
./build.sh
docker run --name archpkg-test --env PACKAGE_NAME=minipro \
- --env FORCE_REBUILD=yes --env CHOWN="$UID:$(id -g "$USER")" \
- -v "$(pwd)/testrun/pkgout:/pkgout" \
+ --env FORCE_REBUILD=yes --env CHOWN="$(id -u "$CHOWN_TO"):$(id -g "$CHOWN_TO")" \
+ -v "$OUTPUT:/pkgout" \
archpkg
docker rm archpkg-test