aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorbeber <beber>2005-10-12 22:39:29 +0000
committerbeber <beber>2005-10-12 22:39:29 +0000
commitbafc8b9eca9f9a56e572ffbbfe261497853cc24e (patch)
tree6c8334547f7cdce9387ddaab075aab31823e618f /sh
parentHey ! check right thing (diff)
downloadespik-bafc8b9eca9f9a56e572ffbbfe261497853cc24e.tar.xz
Ahaha ! there's bug :
Do cd at root of project check right things for cksum avoid bad ; Only check the find --This ....-- style
Diffstat (limited to 'sh')
-rw-r--r--sh/eci.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/sh/eci.sh b/sh/eci.sh
index 1143bbe..e29e2f4 100644
--- a/sh/eci.sh
+++ b/sh/eci.sh
@@ -1,10 +1,12 @@
-#!/bin/sh
+#!/bin/sh -x
TMPFILE="/tmp/.eci.$RANDOM"
touch $TMPFILE
chmod 600 $TMPFILE
+cd $HOME/dev/espik
+
echo "
--This line and thoses under will be ignored--
$(svn st)
@@ -17,24 +19,22 @@ $EDITOR $TMPFILE
SUM_NEW=$(cksum $TMPFILE | awk '{print $1}')
-if [[ $SUM_ORI -eq $SUN_NEW ]] ;
-then
+if [[ $SUM_ORI -eq $SUN_NEW ]]; then
echo "Enter something !"
+ rm -f $TMPFILE
exit -1
fi
-DELCOMMENTFROM=$(grep -n -- '--This line and thoses under will be ignored--' $TMPFILE | cut -d ':' -f 1)
-head -n $(($DELCOMMENTFROM-1)) $TMPFILE > $TMPFILE.send
-
-cd $HOME/dev/espik
+DELCOMMENTFROM=$(grep -n -- '--This line and thoses under will be ignored--' $TMPFILE | head -n 1 | cut -d ':' -f 1)
+head -n $(($DELCOMMENTFROM-1)) $TMPFILE > ${TMPFILE}.send
echo "
$USER from $(hostname -f) : $(date "+%d/%m/%y %X")
-$(cat $TMPFILE.send)
+$(cat ${TMPFILE}.send)
File changes :
$(svn st | grep -v '^?')" >> $HOME/dev/espik/ChangeLog
-svn ci -m "$(cat $TMPFILE.send)"
+svn ci -m "$(cat ${TMPFILE}.send)"
-rm -f $TMPFILE $TMPFILE.send
+rm -f $TMPFILE ${TMPFILE}.send