Merge: doc: fixed some typos and other misc. corrections
[nit.git] / src / git-gen-version.sh
index b21d8bb..9395647 100755 (executable)
 # The version number is stored in a dedicated Nit module.
 
 gen_version() {
-       if ! grep "$*" nit_version.nit >/dev/null 2>&1; then
-               cat > nit_version.nit<<END
+       if ! grep "$*" version.nit >/dev/null 2>&1; then
+               cat > version.nit <<END
 # This file was generated by git-gen-version.sh
-package nit_version
+module version
 fun nit_version: String do return "$*"
 END
                echo "Version $*"
        fi
 }
 
-# Are we in the nitc.nit directory?
-if [ ! -f nitc.nit ]; then
-       if [ -f src/nitc.nit ]; then
+# Are we in the nit.nit directory?
+if [ ! -f nit.nit ]; then
+       if [ -f src/nit.nit ]; then
                cd src
        else
-               echo "Error: no nitc.nit found." >&2
+               echo "Error: no nit.nit found." >&2
                exit 1
        fi
 fi
 
-VN=$(git describe --always HEAD 2>/dev/null)
+VN=`git describe --always HEAD 2>/dev/null`
 if [ "$?" != "0" ]; then
        if [ -r ../VERSION ]; then
                VN="$(cat ../VERSION)"