diff options
author | Erich Eckner <git@eckner.net> | 2021-03-17 13:54:52 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-03-17 13:54:52 +0100 |
commit | af0848751b14d53a9b0c8dd9d0c22cb2866cc27a (patch) | |
tree | e327d35a4a6b8a21ac63f82d5fd608ec18742409 | |
parent | 6094184c2d688df7aab52ac27cd6c0ff2a20fdb6 (diff) | |
download | build-knecht-af0848751b14d53a9b0c8dd9d0c22cb2866cc27a.tar.xz |
build-knecht: actually build stuff
-rwxr-xr-x | build-knecht | 28 |
1 files changed, 27 insertions, 1 deletions
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 |