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:
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"]
volumes:

15
run.sh
View File

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