diff options
author | beber <beber> | 2006-01-17 10:30:40 +0000 |
---|---|---|
committer | beber <beber> | 2006-01-17 10:30:40 +0000 |
commit | 6348222703069a56dbcb01abc98b363a484ae93c (patch) | |
tree | 594c9cae711f61daf8070cfc8a1d4c310e35f169 | |
parent | realy test (diff) | |
download | espik-6348222703069a56dbcb01abc98b363a484ae93c.tar.xz |
testsss
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sh/eci.sh | 40 | ||||
-rw-r--r-- | sh/titi (renamed from sh/tata) | 0 |
3 files changed, 25 insertions, 20 deletions
@@ -1,3 +1,8 @@ +17/01/06 11:30:13 - from cvhj8266@FT-DYOQYGD9HQ8B + sh/eci.sh + + * testsss + 17/01/06 11:24:29 - from cvhj8266@FT-DYOQYGD9HQ8B -sh/toto @@ -1,53 +1,53 @@ #!/bin/bash -PROJECT_PATH="$HOME/dev/espik" +PROJECT_PATH="${HOME}/dev/espik" -TMPFILE="/tmp/.eci-$RANDOM" +TMPFILE="/tmp/.eci-${RANDOM}" -if [ ! -e $PROJECT_PATH ]; then - echo "PROJECT_PATH defined ($PROJECT_PATH) doesn't exist" +if [ ! -e ${PROJECT_PATH} ]; then + echo "PROJECT_PATH defined (${PROJECT_PATH}) doesn't exist" exit -1 fi -if [ -z "$EDITOR" ]; then +if [ -z "${EDITOR}" ]; then echo "EDITOR is not set" exit -1 -elif [ ! -e $(which $EDITOR) ]; then +elif [ ! -e $(which ${EDITOR}) ]; then echo "EDITOR doesn't exist" exit -1 fi -touch $TMPFILE -if [ ! -e $TMPFILE ]; then +touch ${TMPFILE} +if [ ! -e ${TMPFILE} ]; then echo "Cannot write to /tmp" echo "Check perms ;)" exit -1 fi -chmod 600 $TMPFILE +chmod 600 ${TMPFILE} -cd $PROJECT_PATH +cd ${PROJECT_PATH} echo " --This line and thoses under will be ignored-- $(svn st) -$(svn diff)" >> $TMPFILE +$(svn diff)" >> ${TMPFILE} -SUM_ORI=$(cksum $TMPFILE | awk '{print $1}') +SUM_ORI=$(cksum ${TMPFILE} | awk '{print $1}') -$EDITOR $TMPFILE +${EDITOR} ${TMPFILE} -SUM_NEW=$(cksum $TMPFILE | awk '{print $1}') +SUM_NEW=$(cksum ${TMPFILE} | awk '{print $1}') if [ "${SUM_ORI}" = "${SUM_NEW}" ]; then echo "Enter something !" - rm -f $TMPFILE + rm -f ${TMPFILE} exit -1 fi -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 +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 SVN_ST=$(svn st | grep -v '^?') ADDED_FILES=$(echo ${SVN_ST} | grep '^A' | awk '{print "+"$2}' | tr -d '\n') @@ -55,12 +55,12 @@ MODIFIED_FILES=$(echo ${SVN_ST} | grep '^M' | awk '{print " "$2}' | tr -d '\n') DELETED_FILES=$(echo ${SVN_ST} | grep '^D' | awk '{print "-"$2}' | tr -d '\n') echo -e "$(date "+%d/%m/%y %X") - from $(whoami)@$(if [ `uname -o` = "Cygwin" ]; then hostname; else hostname -f; fi) -\t${ADDED_FILES} ${MODIFIED_FILES} ${DELETED_FILES} +\t$(for i in ${ADDED_FILES} ${MODIFIED_FILES} ${DELETED_FILES}; do echo -n $i; done && echo) $(cat ${TMPFILE}.send | sed -r 's/(.*)/\t* \1/g') -$(cat $PROJECT_PATH/ChangeLog)" > $PROJECT_PATH/ChangeLog +$(cat ${PROJECT_PATH}/ChangeLog)" > ${PROJECT_PATH}/ChangeLog svn ci -m "$(cat ${TMPFILE}.send)" -rm -f $TMPFILE ${TMPFILE}.send +rm -f ${TMPFILE} ${TMPFILE}.send |