summaryrefslogtreecommitdiff
path: root/build-knecht
blob: a45e6dbe4b6246eb47adfd71520e5b68af923d37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

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