Module Name:    src
Committed By:   christos
Date:           Fri Jan  4 15:34:47 UTC 2013

Modified Files:
        src/external/bsd/file: file2netbsd

Log Message:
fix version detection


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/file/file2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/file/file2netbsd
diff -u src/external/bsd/file/file2netbsd:1.4 src/external/bsd/file/file2netbsd:1.5
--- src/external/bsd/file/file2netbsd:1.4	Thu Jan  3 18:04:52 2013
+++ src/external/bsd/file/file2netbsd	Fri Jan  4 10:34:47 2013
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: file2netbsd,v 1.4 2013/01/03 23:04:52 christos Exp $
+#	$NetBSD: file2netbsd,v 1.5 2013/01/04 15:34:47 christos Exp $
 #
 # Copyright (c) 2003, 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,7 +41,13 @@ then
 fi
 FILE="$1"
 
-file_vers="$(awk -F', ' '/AC_INIT\(/ { print $2 }' "$FILE/configure.ac")"
+file_vers="$(awk -F',' '/AC_INIT\(/ { print $2 }' "$FILE/configure.ac" | tr -d '[' | tr -d ']' | tr -d ' ')"
+
+case $file_vers in
+[0-9].[0-9][0-9]) ;;
+*)	echo "$PROG: Cannot determine file version: $file_vers" 1>&2
+	exit 1;;
+esac
 
 ### Wipe out stuff we don't want
 find "$FILE" -name .cvsignore -delete

Reply via email to