diff options
-rwxr-xr-x | update.sh | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,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!' |