summarylogtreecommitdiffstats
path: root/pkgrel.sh
blob: c1664c2d5bf5e9d85295a801ac1db920d05187cb (plain)
1
2
3
4
5
6
7
8
9
10
11
function pkgrel {
    FLAG=$1
    for f in $(ls PKGBUILD*)
    do
        PKGREL=$(grep -E "^pkgrel=" $f|cut -f2 -d"=")
        [[ -z $FLAG ]] && PKGREL=$((${PKGREL}+1)) || PKGREL=1
        sed -i 's|^pkgrel=.*$|pkgrel='"${PKGREL}"'|' $f
    done
}

pkgrel $1