Hi all,

Wouldn't it be convenient to have a way to query quilt for its version
number? I think it could be helpful for support (asking the user which
version of quilt he/she is using), as well as for frontends (e.g. Peter
William's gquilt) to find out if the underlying quilt supports a given
command or not.

Attached is a proposed patch implementing "quilt --version". Comments
welcome.

Thanks,
-- 
Jean Delvare
--- quilt-0.40/bin/quilt.in.orig        Tue Apr 26 13:05:34 2005
+++ quilt-0.40/bin/quilt.in     Fri Jun 24 11:18:26 2005
@@ -21,6 +21,7 @@
 {
 
        echo $"Usage: quilt [--trace[=verbose]] [--quiltrc=XX] command [-h] ..."
+       echo $"       quilt --version"
 
        echo $"Commands are:"
        quilt_commands \
@@ -36,7 +37,10 @@
 --quiltrc file
        Use the specified configuration file instead of ~/.quiltrc (or
        /etc/quilt.quiltrc if ~/.quiltrc does not exist).  See the pdf
-       documentation for details about its possible contents."
+       documentation for details about its possible contents.
+
+--version
+       Print the version number and exit immediately."
        exit 1
 }
 
@@ -51,6 +55,12 @@
                fi
        done
 }
+
+if [ $# -ge 1 -a "x$1" == "x--version" ]
+then
+       echo "@VERSION@"
+       exit
+fi
 
 BASH_OPTS=
 while [ $# -ne 0 ]
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to