Fixes to website upload script.

This commit is contained in:
Mike Pope 2015-07-01 21:07:47 +09:30
parent fb46c97c2b
commit 5697c48533
1 changed files with 2 additions and 5 deletions

View File

@ -8,10 +8,7 @@ fi
WEBDIR=www.freecol.org
PREV=`git log --pretty=oneline "$WEBDIR" | sed -n -e '2s/^\([^ ]*\).*$/\1/p'`
cd "$WEBDIR"
{
echo "cd /home/project-web/freecol/htdocs"
for f in `git diff --name-only "$PREV" HEAD "$WEBDIR" | sed -e "s|^$WEBDIR/||"` ; do
echo "put $f $f"
done
} | sftp $USERNAME,freecol@web.sf.net
git diff --name-only "$PREV" HEAD -- "$WEBDIR" | sed -e 's|^[^/]*/\(.*\)$|put \1 \1|p'
} | (cd "$WEBDIR" ; sftp $USERNAME,freecol@web.sf.net)