1#!/bin/sh 2# 3# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's CDN 4# 5# It also loads the 'smoothness' jQuery-UI theme and all referenced images. 6# 7# @author Andreas Gohr <andi@splitbrain.org> 8# @link https://code.google.com/apis/libraries/devguide.html#jquery 9 10# load jQuery 11wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js -O jquery.min.js 12wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js -O jquery.js 13 14# load jQuery-UI 15wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js -O jquery-ui.min.js 16wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js -O jquery-ui.js 17 18# load the smoothness theme 19mkdir -p jquery-ui-theme/images 20wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css -O jquery-ui-theme/smoothness.css 21images=`gawk 'match($0, /url\((images\/[^\)]+)\)/, m) { print m[1] }' jquery-ui-theme/smoothness.css` 22for img in $images 23do 24 wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/$img -O jquery-ui-theme/$img 25done 26