aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sh/eci.sh25
2 files changed, 29 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bc95fa9..1d6dcae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -125,3 +125,9 @@ whoami is better !
File changes :
M sh/eci.sh
+
+beber from guybrush.melee : 13/10/05 19:05:13
+Do more check and be more usable
+
+File changes :
+M sh/eci.sh
diff --git a/sh/eci.sh b/sh/eci.sh
index b1132d1..50749ce 100644
--- a/sh/eci.sh
+++ b/sh/eci.sh
@@ -1,11 +1,32 @@
#!/bin/bash
+PROJECT_PATH="$HOME/dev/espik"
+
TMPFILE="/tmp/.eci.$RANDOM"
+if [ ! -e $PROJECT_PATH ]; then
+ echo "PROJECT_PATH defined ($PROJECT_PATH) doesn't exist"
+ exit -1
+fi
+
+if [ -z "$EDITOR" ]; then
+ echo "EDITOR is not set"
+ exit -1
+elif [ ! -e $(which $EDITOR) ]; then
+ echo "EDITOR doesn't exist"
+ exit -1
+fi
+
touch $TMPFILE
+if [ ! -e $TMPFILE ]; then
+ echo "Cannot write to /tmp"
+ echo "Check perms ;)"
+ exit -1
+fi
+
chmod 600 $TMPFILE
-cd $HOME/dev/espik
+cd $PROJECT_PATH
echo "
--This line and thoses under will be ignored--
@@ -33,7 +54,7 @@ $(whoami) from $(if [ `uname -o` = "Cygwin" ]; then hostname; else hostname -f;
$(cat ${TMPFILE}.send)
File changes :
-$(svn st | grep -v '^?')" >> $HOME/dev/espik/ChangeLog
+$(svn st | grep -v '^?')" >> $PROJECT_PATH/ChangeLog
svn ci -m "$(cat ${TMPFILE}.send)"