3 # Show the version of the Cogito toolkit
4 # Copyright (c) Petr Baudis, 2005
6 # Show which version of Cogito is installed.
7 # Additionally, the 'HEAD' of the installed Cogito
8 # is also shown if this information was available
13 # --lib-dir:: Display Cogito library directory
14 # Display the directory containing Cogito library files.
16 # --share-dir:: Display Cogito share directory
17 # Display the directory containing Cogito shared files.
21 USAGE
="cg-version [--lib-dir] [--share-dir]"
24 .
"${COGITO_LIB}"cg-Xlib ||
exit 1
27 if optparse
--lib-dir; then
29 elif optparse
--share-dir; then
30 echo "${COGITO_SHARE}"
37 head="@@GIT_HEAD_ID@@"
38 if [ -z "$head" ]; then
41 elif [ "$version" = "$head" ]; then
42 echo "$version (real)"
44 echo "$version ($head)"