From 298dbae2a9ba56168aa0aa6bfc9a3df2661f6f11 Mon Sep 17 00:00:00 2001 From: Stefan Grönke Date: Sat, 19 Jan 2013 18:13:12 +0100 Subject: jQuery update.sh * OSX compatible --- lib/scripts/jquery/update.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 lib/scripts/jquery/update.sh (limited to 'lib/scripts/jquery/update.sh') diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh new file mode 100755 index 000000000..9e1f57dd3 --- /dev/null +++ b/lib/scripts/jquery/update.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's CDN +# +# It also loads the 'smoothness' jQuery-UI theme and all referenced images. +# +# @author Andreas Gohr +# @link https://code.google.com/apis/libraries/devguide.html#jquery + +# load jQuery +wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js -O jquery.min.js +wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js -O jquery.js + +# load jQuery-UI +wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js -O jquery-ui.min.js +wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js -O jquery-ui.js + +# load the smoothness theme +mkdir -p jquery-ui-theme/images +wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css -O jquery-ui-theme/smoothness.css.ori +images=`gawk 'match($0, /url\((images\/[^\)]+)\)/, m) { print m[1] }' jquery-ui-theme/smoothness.css` +for img in $images +do + wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/$img -O jquery-ui-theme/$img +done + +# remove font family declarations from smoothness CSS +cat jquery-ui-theme/smoothness.css.ori | sed "s/font-family:[^;]*;//" >> jquery-ui-theme/smoothness.css +rm jquery-ui-theme/smoothness.css.ori \ No newline at end of file -- cgit v1.2.3