git.schokokeks.org
Repositories
Help
Report an Issue
freewvs.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
3753ca3
Branches
Tags
master
v0.1.1
v0.1.2
v0.1.3
v0.1.4
freewvs.git
misc
wpver
adapt wordpress helper script to json format, fix shellcheck issues
Hanno Böck
commited
3753ca3
at 2020-02-17 17:33:46
wpver
Blame
History
Raw
#!/bin/bash # # helper script for development only, creates version list # of all supported wordpress versions + one future version # for each major/minor combination vers=$(curl -s https://api.wordpress.org/core/version-check/1.7/ | jq . | grep current | sed -e 's!^.*: "!!g' -e 's!",$!!g' | sort -ru) safe=$(echo "$vers"|head -n 1) echo ' "safe": "'"$safe"'",' echo -n ' "old_safe": "' for ver in $(echo "$vers"|tail -n +2); do pre=$(echo "$ver" | sed -e 's:[0-9]*$::g') post=$(echo "$ver" | sed -e 's:.*\.::g') ((postadd=post+1)) echo -n "$pre$postadd", echo -n "$pre$post", done | sed -e 's:,$::g' echo '",'