add helper script for wordpress versions so I don't have to maintain it locally
Hanno

Hanno commited on 2019-05-21 22:52:04
Zeige 1 geänderte Dateien mit 26 Einfügungen und 0 Löschungen.

... ...
@@ -0,0 +1,26 @@
1
+#!/bin/sh
2
+#
3
+# helper script for development only, creates version list
4
+# of all supported wordpress versions + one future version
5
+# for each major/minor combination
6
+
7
+vers=$(curl -s https://api.wordpress.org/core/version-check/1.7/ | jq . | grep current | sed -e 's!^.*: "!!g' -e 's!",$!!g' | sort -ru)
8
+
9
+safe=$(echo "$vers"|head -n 1)
10
+
11
+echo safe=$safe
12
+
13
+echo -n old_safe=
14
+for ver in $(echo "$vers"|tail -n +2); do
15
+
16
+	pre=$(echo $ver | sed -e 's:[0-9]*$::g')
17
+	post=$(echo $ver | sed -e 's:.*\.::g')
18
+
19
+	let postadd=post+1
20
+
21
+	echo -n $pre$postadd,
22
+	echo -n $pre$post,
23
+
24
+done | sed -e 's:,$::g'
25
+
26
+echo
0 27