PKGBUILDs/devel/container/containersync
Martchus b7fb618581 Improve user mapping in makecontainerpkg
* Use `--userns` to become `builduser` right away instead of using `sudo`
  to become `builduser`
* Add `builduser` to `sudoers` so it can become root to synchronize
  packages
* Ensure this way that files created within the container have the
  user/group of the user starting the container so build artifacts have the
  right ownership
2023-11-08 17:45:14 +01:00

8 lines
285 B
Bash

#!/bin/bash
set -e
for config_file in {/cfg/,}{makepkg,pacman}.conf; do
[[ -f $config_file ]] && sudo cp --target-directory=/etc "$config_file"
done
[[ -f PKGBUILD ]] && source PKGBUILD
sudo pacman -Syu --noconfirm --needed "${depends[@]}" "${makedepends[@]}" "${checkdepends[@]}"