-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathversionup
67 lines (54 loc) · 2.41 KB
/
versionup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
# simple script to bump the version on faq/platform/ftp/anoncvs pages.
#
# to use, edit STABLE_VERSION and PREV_VERSION in www/build/Makefile
# and run "make version" in that directory.
#
# other areas that may need attention before release time are marked
# with a comment: grep XXXrelease www/*html www/*/*html www/*/*/*html
old="${2%%.*}${2#*.}"
new="${1%%.*}${1#*.}"
oldu="${2%%.*}_${2#*.}"
newu="${1%%.*}_${1#*.}"
oldold=`bc -e scale=1 -e ${2}-0.1 -e quit`
# errata page for the previous release
sed -i "/, which is maintained for one year$/ {s//./;n;d;}" ../errata$old.html
# links to the release page and upgrade guide
sed -i "s/$old\.html/$new\.html/g" \
../alpha.html ../amd64.html ../arm64.html ../armv7.html \
../hppa.html ../i386.html ../landisk.html ../luna88k.html \
../macppc.html ../octeon.html ../sparc64.html ../powerpc64.html \
../riscv64.html ../loongson.html ../stable.html ../faq/index.html
# ofwboot example
sed -i "s/ofwboot $2/ofwboot $1/g" ../macppc.html
# installation media filenames
sed -i -e "s/$old\.img/$new\.img/g" -e "s/$old\.iso/$new\.iso/g" \
../faq/faq4.html ../alpha.html ../amd64.html ../i386.html \
../macppc.html ../sparc64.html ../powerpc64.html ../faq/faq4.html \
../faq/faq16.html
# pubkey file
sed -i "s/openbsd-$old-base/openbsd-$new-base/g" ../faq/faq4.html
# example installer text
sed -i "s/$2 install/$1 install/g" ../faq/faq4.html ../faq/faq14.html
# file sets
sed -i -e "s/$old\.tgz/$new\.tgz/g" -e "s/site$old/site$new/g" \
../faq/faq1.html ../faq/faq4.html
# url paths
sed -i "s/OpenBSD\/$2/OpenBSD\/$1/g" \
../alpha.html ../amd64.html ../arm64.html ../armv7.html \
../hppa.html ../i386.html ../landisk.html ../luna88k.html \
../macppc.html ../octeon.html ../sparc64.html ../powerpc64.html \
../riscv64.html ../loongson.html ../faq/faq4.html
# "the latest supported release is..."
sed -i "s/OpenBSD\ $2/OpenBSD\ $1/g" \
../alpha.html ../amd64.html ../arm64.html ../armv7.html \
../hppa.html ../i386.html ../landisk.html ../luna88k.html \
../macppc.html ../octeon.html ../sparc64.html ../powerpc64.html \
../riscv64.html ../loongson.html
# cvs command examples
sed -i "s/$oldu/$newu/g" mirrors/anoncvs.html.head ../faq/faq5.html
# just the version
sed -i "s/$2/$1/g" mirrors/anoncvs.html.head mirrors/ftp.html.end \
../faq/index.html ../faq/faq5.html
# comment about mirrors carrying the previous release
sed -i "s/$oldold/$2/g" mirrors/ftp.html.end