summaryrefslogtreecommitdiff
path: root/cpan2cruxPorts/rebuild
blob: 3702b21c8afc666643f4156f6f95cecab580ed9b (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

set -e

cd "${0%/*}"

for pkg in p5-*/Pkgfile; do
  cd "${pkg%/*}"
  eval "$(
    grep '^release=' 'Pkgfile'
  )"
  sed -i '
    /^release=/ s@=.*$@='"$((release+1))"'@
  ' 'Pkgfile'
  
  sudo -u pkgmk fakeroot pkgmk -if -is -f
  pkgmk -uf
  if git status --porcelain | grep -qF " cpan2cruxPorts/${pkg%/*}/.footprint"; then
    pkgmk -us -sk '/etc/ports/deepthought.sec'
    git add 'Pkgfile' '.footprint' '.signature'
  else
    git checkout 'Pkgfile'
  fi
  cd ..
done

if [ -n "$(git status --porcelain)" ]; then
  git commit -m'rebuild cpan2cruxPorts'
fi