Debian Codegraph @

set_version.sh

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #!/bin/bash
2
3 VER=${1:?Provide version sring on command line}
4 DATE=$(TZ=UTC LOCALE=C date '+%B %e, %Y')
5 DATE_SHORT=$(TZ=UTC LOCALE=C date '+%B %Y')
6
7 sed -i "4s/.*/v$VER, $DATE_SHORT/" doc/cset{,-proc,-set,-shield}.txt
8 sed -i "s/cset v\([[:digit:]]\+\.\)\+[[:digit:]]\+ /cset v$VER /" doc/tutorial.txt
9 sed -i "s/^\(Version:[[:space:]]*\).*/\1$VER/" cpuset.spec
10 sed -i "s/^\(version = '*\).*\('[[:space:]]*$\)/\1$VER\2/" cpuset/version.py
11 sed -i "1i \
12 ============================================================\n\
13 Cpuset $VER ($DATE)\n\
14 https://github.com/SUSE/cpuset\n\
15 http://download.opensuse.org/hardware/cpuset/\n\
16 \n
17 " NEWS
18 ${EDITOR:-vi} NEWS
19 TEMP=$(mktemp)
20 sed '6,/^===/{/^=/d;p};d' NEWS > $TEMP
21 git commit -s -t $TEMP cpuset.spec cpuset/version.py NEWS \
22 doc/cset{,-proc,-set,-shield}.txt doc/tutorial.txt
23 rm -f $TEMP
24 git tag v$VER