aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber.mailing@gmail.com>2006-02-05 00:45:01 +0100
committerBeber (guybrush@melee) <beber@guybrush.melee>2006-02-05 00:45:01 +0100
commit2465e6d63e63db568c8f4ae6d5ea368448dbf4bd (patch)
tree963948cc9ceaab1f6328b23b88ed24bcdf6b0dbd
parentBeggening of opt sparser (diff)
downloadespik-2465e6d63e63db568c8f4ae6d5ea368448dbf4bd.tar.xz
Better git-version
install sh too arrange gitignore
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rw-r--r--configure.in1
-rw-r--r--m4/ac_espik_version.m48
-rw-r--r--sh/Makefile.am2
-rwxr-xr-xsh/get.sh8
-rwxr-xr-xsh/get_version.sh22
-rwxr-xr-xsh/propset.sh18
-rw-r--r--src/.gitignore6
-rw-r--r--src/Makefile.am3
-rw-r--r--src/espik.c2
11 files changed, 36 insertions, 37 deletions
diff --git a/.gitignore b/.gitignore
index e6be05d..8aadfdc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/sh/get.sh b/sh/get.sh
index c52b818..3ebf322 100755
--- a/sh/get.sh
+++ b/sh/get.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 ())