You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/version/short.txt.do

19 lines
366 B
Plaintext

redo-ifchange long.txt
read -r LONGVER junk <long.txt
# Convert a version like "0.92-98-g123456" into "0.92-98".
# Sometimes the version is just "0.92-0", in which case we leave it as is.
case $LONGVER in
*-*-*)
echo "${LONGVER%-*}" >$3
;;
*-*)
echo "$LONGVER" >$3
;;
*)
echo "Fatal: long version in invalid format." >&2
exit 44
esac
redo-stamp <$3