added version script (reverse-merged from commit 6f45b47ed27b53f8a445fe5e075cb972704569d6)