mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 15:27:17 +00:00
There are two major changes here. First of all, the image generation now consist of two separated stages, the build itself and the production image generation. Secondly, the packages inside image are now installed as they were at the time of the root image generation (defined by stat command) Another side change is that container does not longer ship syncronized (and out-of-dated) pacman databases; they have to be synced manually
17 lines
470 B
Bash
Executable File
17 lines
470 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
for PACKAGE in "$@"; do
|
|
BUILD_DIR="$(mktemp -d)"
|
|
# clone the remote source
|
|
git clone https://aur.archlinux.org/"$PACKAGE".git "$BUILD_DIR"
|
|
cd "$BUILD_DIR"
|
|
# checkout to the image date
|
|
git checkout "$(git rev-list -1 --before="$(stat -c "%y" "/var/lib/pacman" | cut -d " " -f 1)" master)"
|
|
# build and install the package
|
|
makepkg --nocheck --noconfirm --install --rmdeps --syncdeps
|
|
cd /
|
|
rm -r "$BUILD_DIR"
|
|
done
|