diff --git a/docker-compose.yml b/docker-compose.yml index f230859..71614ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/run.sh b/run.sh index 5a36674..6750bd4 100644 --- a/run.sh +++ b/run.sh @@ -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.* }