summaryrefslogtreecommitdiff
path: root/build-knecht
blob: 8c1ea9928b981366670eec8e3d3de36ece817ad1 (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

if [ -n "$1" ]; then
  arch="$1"
else
  arch=$(
    pacman-conf Architecture
  )
fi

if ! git -C "${home_dir}/archlinuxewe" pull --ff-only; then
  >&2 echo 'Cannot update archPackages repository.'
fi

"${home_dir}/archlinuxewe/archPackagesUpdate" \
  --no-abortOnMakepkgError \
  --arch "${arch}"

true