blob: 14efac12d6c8e4a7382c13d6000c60317653204d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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~
|