mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-15 22:34:51 +00:00
An upload script
Very basic, just uploads to tiddlywiki.com/tiddlywiki5
This commit is contained in:
parent
73a724ea39
commit
a3d653e152
@ -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
37
upload.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user