diff options
Diffstat (limited to '')
-rw-r--r-- | sh/eci.sh | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -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)" |