Skip to content

Commit

Permalink
xrevbump: use xdistdir to find the template
Browse files Browse the repository at this point in the history
Closes: #151 [via git-merge-pr]
  • Loading branch information
Piraty authored and leahneukirchen committed Sep 10, 2019
1 parent 1117158 commit 398c230
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xrevbump
Expand Up @@ -23,9 +23,11 @@ bump() {
t="$t/template"
elif [ -f "srcpkgs/$t/template" ]; then
t="srcpkgs/$t/template"
elif [ -f "$XBPS_DISTDIR/srcpkgs/$1/template" ]; then
t="$XBPS_DISTDIR/srcpkgs/$1/template"
else
printf "Cannot find template '%s'\n" "$t"
break
return
fi

. "$t"
Expand All @@ -45,6 +47,8 @@ bump() {
esac
}

XBPS_DISTDIR="$(xdistdir)"

if [ "$1" = - ]; then
while IFS="$nl" read -r t; do
bump "$t"
Expand Down

0 comments on commit 398c230

Please sign in to comment.