1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

An upload script

Very basic, just uploads to tiddlywiki.com/tiddlywiki5
This commit is contained in:
Jeremy Ruston 2012-01-14 18:34:34 +00:00
parent 73a724ea39
commit a3d653e152
2 changed files with 38 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# Introduction
Welcome to TiddlyWiki5, a complete rewrite of TiddlyWiki, the reusable non-linear personal web notebook first released in 2004.
Welcome to TiddlyWiki5, a complete rewrite of TiddlyWiki, the reusable non-linear personal web notebook that was first released in 2004.
TiddlyWiki5 is an interactive wiki written in JavaScript to run in the browser or under node.js. For full documentation, see the finished build at http://tiddlywiki.com/tiddlywiki5/.

37
upload.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# Upload the latest build of tiddlywiki5 to the server at http://www.tiddlywiki.com/
# Usage:
# upload [user]
# default values
REMOTE_USER=${1:-$USER}
FROMDIR=$PWD/tmp/tw5
HOST="tiddlywiki.com"
DIR="/var/www/www.tiddlywiki.com/htdocs/tiddlywiki5"
OWNER="www-data:www-data"
PERM="664"
# setPermissions()
# Usage:
# setPermissions file
function setPermissions() {
COMMANDS="$COMMANDS sudo chown $OWNER $1;"
COMMANDS="$COMMANDS sudo chmod $PERM $1;"
}
echo "uploading files"
FILES="$FROMDIR/index.html $FROMDIR/index.xml"
scp $FILES "$REMOTE_USER@$HOST:$DIR"
echo "setting file permissions"
COMMANDS="ssh $REMOTE_USER@$HOST"
setPermissions "$DIR/index.html"
setPermissions "$DIR/index.xml"
# execute
COMMANDS="$COMMANDS exit;"
$COMMANDS