blob: a480d9e4c691f223a291cfe3293f5b9d24e4c43e [file] [log] [blame]
Robert R Evansa4d02422010-10-02 15:07:29 -07001#!/bin/bash
Robert R Evansc9da0862010-10-06 17:27:55 -07002#
3# The install directory is hard-coded. TOOD: allow the directory to be specified on the command line.
4#
5
Travis Swicegooda694d2d2011-05-29 15:25:26 -05006[[ -z "$JQUERY_VERSION_NUMBER" ]] && JQUERY_VERSION_NUMBER="1.6.1"
7[[ -z "$JQUERY_UI_VERSION_NUMBER" ]] && JQUERY_UI_VERSION_NUMBER="1.8.13"
Robert R Evansa4d02422010-10-02 15:07:29 -07008
9function rails_jquery {
10 curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js
11}
12
13function jquery_install {
Travis Swicegooda694d2d2011-05-29 15:25:26 -050014 if [ -z "$1" ]
15 then
16 version=$JQUERY_VERSION_NUMBER
17 else
18 version="$1"
19 fi
20 curl -o public/javascripts/jquery.js "http://ajax.googleapis.com/ajax/libs/jquery/$version/jquery.min.js"
Robert R Evansa4d02422010-10-02 15:07:29 -070021}
22
Travis Swicegooda694d2d2011-05-29 15:25:26 -050023function jquery_ui_install {
24 if [ -z "$1" ]
25 then
26 version=$JQUERY_UI_VERSION_NUMBER
27 else
28 version="$1"
29 fi
30
31 curl -o public/javascripts/jquery_ui.js "http://ajax.googleapis.com/ajax/libs/jqueryui/$version/jquery-ui.min.js"
32}