From af0848751b14d53a9b0c8dd9d0c22cb2866cc27a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 17 Mar 2021 13:54:52 +0100 Subject: build-knecht: actually build stuff --- build-knecht | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/build-knecht b/build-knecht index d87f29e..a45e6db 100755 --- a/build-knecht +++ b/build-knecht @@ -1,3 +1,29 @@ #!/bin/bash -exit 1 +home_dir=$( + getent passwd makepkg \ + | cut -d: -f6 +) + +if [ -z "${home_dir}" ]; then + >&2 echo 'Cannot find homedir of user "makepkg".' + exit 1 +fi + +arch=$( + uname -m \ + | sed ' + s/^\(armv[67]\)l$/\1h/ + ' +) + +if ! git -C "${home_dir}/archPackages" pull --ff-only; then + >&2 echo 'Cannot update archPackages repository.' + exit 1 +fi + +"${home_dir}/archPackages/archPackagesUpdate" \ + --no-abortOnMakepkgError \ + --arch "${arch}" + +true -- cgit v1.2.3-70-g09d2