Help me test v0.6!
This version is undergoing regular development, so the usual caveats apply. If you find what think is a bug, please create an issue on my Google Code project site, or leave a comment on a recent blog posting.
Development notes about Grendel, a Pathfinder character manager for iPhone, Android, and other 320x devices. Based on 3.5e rules.
Usage: upload.sh [path containing the files to upload]
hput () {
eval hash"$1"='$2'
}
hget () {
eval echo '${hash'"$1"'#hash}'
}
hput js javascript
hput html html
hput css css
directory=$@
if [ -z "$directory" ]
then
directory="."
fi
filetypes="$directory/*.css
$directory/*.html
$directory/*.js"
for file in $filetypes
do
filename=`basename "$file"`
ext=`hget ${filename##*.}`
rev=`curl -sX GET 'http://grendel.cloudant.com/cm-dev/hrothgar/' | jsawk 'return this._rev'`
echo File : $file
echo Current revision : $rev
echo Uploading document: $filename
echo "${ext}"
echo curl : curl -X PUT http://grendel.cloudant.com/cm-dev/hrothgar/$filename?rev=$rev --data-binary @$file -H 'Content-Type: text/'$ext
curl -X PUT http://grendel.cloudant.com/cm-dev/hrothgar/$filename?rev=$rev --data-binary @$file -H 'Content-Type: text/'$ext
echo --------------------------------------------
echo
done