diff options
author | Bertrand Jacquin (Beber) <beber.mailing@gmail.com> | 2006-02-05 00:45:01 +0100 |
---|---|---|
committer | Beber (guybrush@melee) <beber@guybrush.melee> | 2006-02-05 00:45:01 +0100 |
commit | 2465e6d63e63db568c8f4ae6d5ea368448dbf4bd (patch) | |
tree | 963948cc9ceaab1f6328b23b88ed24bcdf6b0dbd | |
parent | Beggening of opt sparser (diff) | |
download | espik-2465e6d63e63db568c8f4ae6d5ea368448dbf4bd.tar.xz |
Better git-version
install sh too
arrange gitignore
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | m4/ac_espik_version.m4 | 8 | ||||
-rw-r--r-- | sh/Makefile.am | 2 | ||||
-rwxr-xr-x | sh/get.sh | 8 | ||||
-rwxr-xr-x | sh/get_version.sh | 22 | ||||
-rwxr-xr-x | sh/propset.sh | 18 | ||||
-rw-r--r-- | src/.gitignore | 6 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/espik.c | 2 |
11 files changed, 36 insertions, 37 deletions
@@ -8,7 +8,6 @@ stamp-h1 autom4te.cache aclocal.m4 ltmain.sh -svn-commit*.tmp espik *.tar.gz libtool diff --git a/Makefile.am b/Makefile.am index 84f0647..e476b24 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = src +SUBDIRS = sh src EXTRA_DIST = README COPYING AUTHORS ChangeLog INSTALL NEWS diff --git a/configure.in b/configure.in index 25fe19c..35352cb 100644 --- a/configure.in +++ b/configure.in @@ -26,5 +26,6 @@ AC_CHK_EVAS AC_OUTPUT([ Makefile + sh/Makefile src/Makefile ]) diff --git a/m4/ac_espik_version.m4 b/m4/ac_espik_version.m4 index 4f355c4..627c1b1 100644 --- a/m4/ac_espik_version.m4 +++ b/m4/ac_espik_version.m4 @@ -1,12 +1,8 @@ AC_DEFUN([AC_ESPIK_VERSION], [ - AC_MSG_CHECKING(for git commit) + AC_MSG_CHECKING(for version) - if test `eval git hash-object .git/HEAD`; then - GITVERSION=`git hash-object .git/HEAD` - else - GITVERSION=`date +%Y%m%d` - fi + GITVERSION=$(sh/get_version.sh) AC_MSG_RESULT($GITVERSION) diff --git a/sh/Makefile.am b/sh/Makefile.am new file mode 100644 index 0000000..e6e99e3 --- /dev/null +++ b/sh/Makefile.am @@ -0,0 +1,2 @@ +bin_SCRIPTS = \ + nc_serv.sh @@ -1,6 +1,6 @@ #!/bin/sh +# +# (c) 2006 Bertrand Jacquin <beber:setibzh.com> +# -# (c) 2005 Bertrand Jacquin <beber:setibzh.com> -# Under GPLv2 - -svn co http://guybrush.ath.cx/public/espik +cg-clone http://guybrush.ath.cx/git/public/e/espik.git diff --git a/sh/get_version.sh b/sh/get_version.sh new file mode 100755 index 0000000..b8a7d38 --- /dev/null +++ b/sh/get_version.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# (c) 2006 Bertrand Jacquin <beber.mailing@gmail.com> +# + +if [ -d .git ]; then + head=$(git rev-parse --verify HEAD 2>/dev/null) + + if [ "`git name-rev --tags HEAD`" = "HEAD undefined" ]; then + version="g$(echo "${head}" | cut -c 1-8)" + fi + + if [ -n "$(git diff-files)" ]; then + version="${version}-dirty" + fi +else + version=$(date +%Y%m%d) +fi + +echo ${version} + +exit 0 diff --git a/sh/propset.sh b/sh/propset.sh deleted file mode 100755 index dc9dc8b..0000000 --- a/sh/propset.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# All parameters will be then ignore by svn st - -export LC_ALL=C - -while [ ! -z "$1" ] -do - echo $1 >> .svnignore - shift -done - -svn commit -m "ignore update" - -svn propset svn:ignore -F .svnignore . -svn up - -svn commit -m "propset update" diff --git a/src/.gitignore b/src/.gitignore index a0cbd98..96fd362 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,9 +1,3 @@ -.deps -.libs -espik -Makefile -Makefile.in espik.log *.o -*.S .*.swp diff --git a/src/Makefile.am b/src/Makefile.am index 1172360..cad45df 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +# %:: +# ../sh/get_version.sh + AM_CFLAGS = \ $(DEBUG_CFLAGS) \ -W -Wall \ diff --git a/src/espik.c b/src/espik.c index 5514ce7..7570525 100644 --- a/src/espik.c +++ b/src/espik.c @@ -75,7 +75,7 @@ int main (int argc, char **argv) __indent_level = 0; espik_enter(); - printf ("Welcome to %s %s\n", APPS_NAME, ESPIK_VERSION); + printf ("Welcome to %s-%s\n", APPS_NAME, ESPIK_VERSION); espik_init(); if (!ecore_init ()) |