diff options
Diffstat (limited to 'setver')
-rwxr-xr-x | setver | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#!/bin/sh + +set -eu + +OPK_SOURCE="$(sed 's/ .*//; q;' changelog)" +BASE_VERSION="${OPK_SOURCE#linux-libre-}" +GIT='' +[ -d .git/ ] && GIT='git' + +for pkg in *.pkg/; do + ${GIT} mv "${pkg}" "${pkg%-*.pkg/}-${BASE_VERSION}.pkg/" +done + +printf 'VER = %s\n' "${BASE_VERSION}" 1>basever.mk +mv substvars substvars~ +sed "s/^Base-Version:.*$/Base-Version: ${BASE_VERSION}/" substvars~ 1>substvars +rm substvars~ |