20090408


#!/bin/sh
#remove the line below the config (marked remove) after editing to make it work ;)

#set -o xtrace
CURDIR="$(pwd)"
FROMDIR="/Users/drkrimson/Work/inhouse/tantekaat"
TODIR="/Users/drkrimson/Sites/kaat.tys/"
SVNLOC="file:///Users/drkrimson/Documents/SVNRoot/trunk/inhouse/tantekaat/WebRoot"
TONEWDIR="public_html"
COMMITMSG="exporting ${FROMDIR} to ${TODIR} on ${TODAY}"

# remove
exit

cd "$FROMDIR"
svn add *{,/*{,/*{,/*{,/*}}}} 2>/dev/null
CMTEST="$(svn commit -m "${COMMITMSG}" | grep -i revision 2>&1)"
if [[ -n "$CMTEST" ]]; then
echo "$CMTEST"
cd "$TODIR"
rm -rf "${TONEWDIR}_previous"
mv -f "$TONEWDIR" "${TONEWDIR}_previous"
SVNE=$(svn export --force "${SVNLOC}" "${TONEWDIR}" | grep -i revision 2>&1)
echo "$SVNE"
else
echo "Couldn't commit!"
echo "$CMTEST"
fi
if [[ -f ${CURDIR}${0}.after.sh ]]; then
${CURDIR}${0}.after.sh
fi
cd $CURDIR

--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

No comments:

Post a Comment