summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-knecht28
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