summaryrefslogtreecommitdiff
path: root/update.sh
blob: f0b326484eac0b96342d7478e83e93ad65f50100 (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
#!/bin/bash

set -e

pkg="$1"
version="$2"

cd /usr/src/ports/*/${pkg}
oldVer=$(
  sed -n '
    s/^version=//
    T
    p
  ' Pkgfile
)
sed -i '
  /^version=/ s/=.*$/='"${version}"'/
' Pkgfile
sudo -u pkgmk fakeroot pkgmk -if -im -is -d
pkgmk -uf
pkgmk -um
pkgmk -us -sk /etc/ports/deepthought.sec
git commit . -m "${pkg}: ${oldver} -> ${version}"

echo 'Erfolg!'