update build container

This commit is contained in:
Daniel Langbein 2021-05-14 12:59:53 +02:00
parent 24d18886b6
commit b1b680ce28
2 changed files with 6 additions and 12 deletions

View File

@ -5,9 +5,6 @@ services:
makepkg: makepkg:
build: . build: .
## One could build multiple packages with one container,
## but I recommend to use a clean container for each package!
# command: ["de-p1st-font", "de-p1st-nano", "de-p1st-grub", "de-p1st-installer", "de-p1st-repo"]
command: ["de-p1st-font"] command: ["de-p1st-font"]
volumes: volumes:

13
run.sh
View File

@ -40,24 +40,21 @@ function main(){
# Write-permission for user "build" # Write-permission for user "build"
sudo chown "build:wheel" /out sudo chown "build:wheel" /out
# Refresh mirrors # Refresh mirrors
sudo pacman -Sy sudo pacman -Sy
# If first argument is zero, use default directory # If first argument is zero, use default directory
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
PKG=/pkg PKG=/pkg
echo "No argument given. Using default ${PKG} directory to look for PKGBUILD ..." echo "No argument given. Using default directory ${PKG} to look for PKGBUILD ..."
build-pkg # Else append argument $1 as relative path
# Else repeat fo for each argument
else else
for RELATIVE_PKG_DIR in "$@"; do PKG=/pkg/"${1}"
PKG=/pkg/"${RELATIVE_PKG_DIR}"
echo "Looking for PKGBUILD in ${PKG} ..." echo "Looking for PKGBUILD in ${PKG} ..."
build-pkg
done
fi fi
build-pkg
# Ensure permissions match those of the original PKGBUILD. # Ensure permissions match those of the original PKGBUILD.
sudo chown "$(stat -c '%u:%g' "${PKG}"/PKGBUILD)" /out/*.pkg.tar.* sudo chown "$(stat -c '%u:%g' "${PKG}"/PKGBUILD)" /out/*.pkg.tar.*
} }