]> wagnertech.de Git - projects.git/blobdiff - tools/make/mconfigure
phpide
[projects.git] / tools / make / mconfigure
index be5f3ba6b73a3e365b96236a1a5d1cd361da6a8d..8ce366eca347332396bd07fab8ab2e269ef37173 100755 (executable)
@@ -25,19 +25,20 @@ function set_build {
                then
                        tag="${tag}M"
                fi
-               version=${tag%-*}
+               version=${tag%%-*}
                build=${tag#*-}
        fi
 }
 
 function check_version {
+       vline=$(head -1 debian/$paket.changelog)
+       vline=${vline%-*}
+       clversion=${vline#*(}
        if [ $version = "0.0" ]
        then
+               version=$clversion
                return
        fi
-       vline=$(head -1 debian/$paket.changelog)
-       vline=${vline%-*}
-       clversion=${vline#*(}
        if [ "$clversion" != $version ]
        then
                echo "version mismatch: git: $version, changelog: $clversion"
@@ -60,6 +61,7 @@ then
        exit 2
 fi
 
+paket=$1
 echo "export paket=$1" > debian/setenv.sh
 shift
 ARCH=""