From fd6c7da36fdd7d406cd82a14ca63d5ccdcbc3b01 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 6 Apr 2001 19:05:42 +0000 Subject: [PATCH] Change `get_release' to support up to 5 components in the version. Change `get_release_prefix' and `get_release_tag' to accept a version-number argument. --- v7/dist/release-prefix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/v7/dist/release-prefix b/v7/dist/release-prefix index be8893c8a..bd404546f 100755 --- a/v7/dist/release-prefix +++ b/v7/dist/release-prefix @@ -1,5 +1,5 @@ -# $Id: release-prefix,v 1.6 2001/03/05 20:47:50 cph Exp $ +# $Id: release-prefix,v 1.7 2001/04/06 19:05:42 cph Exp $ # # Copyright (c) 2000-2001 Massachusetts Institute of Technology # @@ -19,15 +19,22 @@ get_release () { - fgrep Release /scheme/v7/src/runtime/version.scm | awk '{ print $3 "." $4 "." $5 }' | tr -d \(\)\' + fgrep Release /scheme/v7/src/runtime/version.scm \ + | awk 'BEGIN { OFS = "." } + NF == 5 { print $3, $4, $5 } + NF == 6 { print $3, $4, $5, $6 } + NF == 7 { print $3, $4, $5, $6, $7 }' \ + | tr -d \(\)\'\" } get_release_prefix () { - echo "scheme-$(get_release)" + v="${1:-$(get_release)}" + echo "scheme-${v}" } get_release_tag () { - echo "release-$(get_release | tr . -)" + v="${1:-$(get_release)}" + echo "release-$(echo "${v}" | tr . -)" } -- 2.25.1