X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=maintainer%2Frename-tests;h=bdbd791c8fa55112efc76a3030157f580f48367c;hb=90c69318b90f7d00013b4d4cbb3fbc1c469d2cec;hp=6fce9fe841ba4d4ff4100ad0eca62ac786546f0a;hpb=dbe3eea4d5b65f998c57a571c034c6044f2bd1e2;p=platform%2Fupstream%2Fautomake.git diff --git a/maintainer/rename-tests b/maintainer/rename-tests index 6fce9fe..bdbd791 100755 --- a/maintainer/rename-tests +++ b/maintainer/rename-tests @@ -1,9 +1,25 @@ #!/usr/bin/env bash # Convenience script to rename test cases in Automake. +# Copyright (C) 2013 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + set -e -u me=${0##*/} +msg_file=$me.git-msg fatal () { echo "$me: $*" >&2; exit 1; } case $# in @@ -15,7 +31,7 @@ esac AWK=${AWK-awk} SED=${SED-sed} -[[ -f automake.in && -d lib/Automake ]] \ +[[ -f bin/automake.in && -d lib/Automake ]] \ || fatal "can only be run from the top-level of the Automake source tree" $SED --version 2>&1 | grep GNU >/dev/null 2>&1 \ @@ -32,7 +48,7 @@ input=$( " <<<"$input") # Prepare git commit message. -exec 5>$me.git-msg +exec 5>"$msg_file" echo "tests: more significant names for some tests" >&5 echo >&5 $AWK >&5 <<<"$input" \ @@ -43,10 +59,15 @@ exec 5>&- eval "$($AWK '{ printf ("git mv %s %s\n", $1, $2) }' <<<"$input")" # Adjust the list of tests (do this conditionally, since such a -# list is not required nor used in Automake-NG. +# list is not required nor used in Automake-NG). if test -f t/list-of-tests.mk; then $SED -e "$($AWK '{ printf ("s|^%s |%s |\n", $1, $2) }' <<<"$input")" \ -i t/list-of-tests.mk + git add t/list-of-tests.mk fi git status +echo +echo "NOTICE: pre-filled commit message is in file '$msg_file'" + +exit 0