An upload script

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

No files matched your search

+1 -1
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/.
Executable
+37
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