Codebase list rust-libslirp / 3044e45f-3c8f-4934-8642-729c2b955f1c/main dev / filter-semver.sh
3044e45f-3c8f-4934-8642-729c2b955f1c/main

Tree @3044e45f-3c8f-4934-8642-729c2b955f1c/main (Download .tar.gz)

filter-semver.sh @3044e45f-3c8f-4934-8642-729c2b955f1c/mainraw · history · blame

1
2
3
4
5
6
#!/bin/sh
# Given a full version string, output just the part that is significant for
# semver. i.e.. 0.x.* becomes 0.x and x.* becomes x for x != 0.
sed -r \
 -e 's/([1-9]+)\.[0-9]+\.[0-9]+/\1/g' \
 -e 's/(0\.[0-9]+)\.[0-9]+/\1/g'