From ee0a49f0d4465d339bebe15d7cfb95581348e807 Mon Sep 17 00:00:00 2001 From: Barattero Laurent Date: Sat, 25 Jan 2014 10:34:07 +0100 Subject: Fix bug --- dev/updateVersion.sh | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'dev/updateVersion.sh') diff --git a/dev/updateVersion.sh b/dev/updateVersion.sh index a6af91e..fe91707 100644 --- a/dev/updateVersion.sh +++ b/dev/updateVersion.sh @@ -1,4 +1,22 @@ #!/bin/bash - +# +# Copyright (C) 2014 BARRATERO Laurent +# +# AeroUp 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 3 of the License, or +# (at your option) any later version. +# +# Aeroup 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + #=============================================================================== # # FILE: updateVersion.sh @@ -19,7 +37,7 @@ # AUTHOR: BARATTERO Laurent, laurentBalarueluberlu.net # ORGANIZATION: La rue Luberlu # CREATED: 22/01/2014 03:14:03 CET -# REVISION: 0.1 +# REVISION: 0.2 #=============================================================================== set -o nounset # Treat unset variables as an error @@ -113,9 +131,8 @@ if [ $opt_update = 1 ]; then # Src Files for file in $(find $DIR/../src/ -name "*.cpp" -o -name "*.h*"); do - version=(sed -n -e 's/\(^[[:blank:]]\*[[:blank:]]\+Version:[[:blank:]]\+\)\([[:digit:]]\+\.[[:digit:]]\+\(\.[[:digit:]]\+\)*\)\([[:blank:]]\+\)/\2/p' $file) + VERSION=(sed -n -e 's/\(^[[:blank:]]\*[[:blank:]]\+Version:[[:blank:]]\+\)\([[:digit:]]\+\.[[:digit:]]\+\(\.[[:digit:]]\+\)*\)\([[:blank:]]\+\)/\2/p' $file) if [ "$NEW_VERSION" != "$VERSION" ] ; then - echo "Update $README ? y/n" echo "Update "${file##*/../.}" ? y/n" yesOrNot if [ $answer == "y" ] ; then @@ -127,8 +144,8 @@ if [ $opt_update = 1 ]; then else echo "No think do to" fi - done + fi # ---------- end of opt_update ---------- if [ $opt_help = 1 ]; then -- cgit v1.2.3