summaryrefslogtreecommitdiffstats
path: root/build-repo
blob: 596ec8b3642c73060d7150d43c57fc45aa0c7e66 (plain) (blame)
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
30
31
32
#!/usr/bin/env zsh
set -eax
# note: we assume `abuild-keygen -a -i` has alr been run
ALL_TARGET="$PWD/target"
export APORTSDIR="$PWD/src"
for REPOPATH in ./src/*; do
  cd "$REPOPATH";
  REPO="$(basename "$REPOPATH")";
  for PKG in ./*; do
    if [[ -d "$PKG" ]] && [[ -f "$PKG/APKBUILD" ]]; then
      cd "$PKG";
      PKG="$(basename "$PKG")";

      if [[ "$FILTER" == "" ]] || [[ "$FILTER" == "$REPO" ]] || [[ "$FILTER" == "$PKG" ]] || [[ "$FILTER" == "$REPO/$PKG" ]]; then
        if [[ "$IPV6_ONLY" == "true" ]] && [[ -f ".is_ipv4_only" ]]; then
          echo -e "Skipping repository."
        else
          if [[ "$NEWSUM" == "1" ]]; then abuild checksum; fi
          if [[ "$ROOTBLD" != "0" ]]; then
            abuild -P "$ALL_TARGET" rootbld
          else
            abuild -r -P "$ALL_TARGET"
          fi
        fi
      fi

      cd ..;
    fi
  done
  cd ../..;
done