Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 29 lines (22 sloc) 1.249 kb
1f3bd20 @paulcarey Initial revision
authored
1 #!/bin/bash
2
d1b35bb @paulcarey Print error if design doc already exists
authored
3 set -u
4
5 DB_NAME=$1
1f3bd20 @paulcarey Initial revision
authored
6
7 DESIGN_DOC=localhost:5984/${DB_NAME}/_design%2Ffuschia
8
9 JS='Content-Type:application/x-javascript'
10 HTML='Content-Type:text/html'
11 SWF='Content-Type:application/x-shockwave-flash'
12 CSS='Content-Type:text/css'
13
d1b35bb @paulcarey Print error if design doc already exists
authored
14 RES=`curl -s $DESIGN_DOC | grep not_found`
15 if [ $? != 0 ]; then
16 echo "${DESIGN_DOC} exists!"
17 echo It must be deleted before running this script
18 exit 1
19 fi
20
1f3bd20 @paulcarey Initial revision
authored
21 REV=`curl -s -T bin/fuschia_queries.json $DESIGN_DOC | egrep -o '[0-9]+'`
22 REV=`curl -s -H $JS -T bin/AC_OETags.js ${DESIGN_DOC}/AC_OETags.js?rev=${REV} | egrep -o '[0-9]+'`
23 REV=`curl -s -H $HTML -T bin/Fuschia.html ${DESIGN_DOC}/Fuschia.html?rev=${REV} | egrep -o '[0-9]+'`
24 REV=`curl -s -H $SWF -T bin/Fuschia.swf ${DESIGN_DOC}/Fuschia.swf?rev=${REV} | egrep -o '[0-9]+'`
25 REV=`curl -s -H $CSS -T bin/history/history.css ${DESIGN_DOC}/history/history.css?rev=${REV} | egrep -o '[0-9]+'`
26 REV=`curl -s -H $JS -T bin/history/history.js ${DESIGN_DOC}/history/history.js?rev=${REV} | egrep -o '[0-9]+'`
27 REV=`curl -s -H $HTML -T bin/history/historyFrame.html ${DESIGN_DOC}/history/historyFrame.html?rev=${REV} | egrep -o '[0-9]+'`
28 REV=`curl -s -H $SWF -T bin/playerProductInstall.swf ${DESIGN_DOC}/playerProductInstall.swf?rev=${REV} | egrep -o '[0-9]+'`
Something went wrong with that request. Please try again.