Skip to content

Commit

Permalink
Only update requireJS if we need to
Browse files Browse the repository at this point in the history
  • Loading branch information
traviskaufman committed Jul 16, 2012
1 parent 5fcabb9 commit 5c2e907
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/.rjs_version
@@ -0,0 +1 @@
1.0.5
7 changes: 7 additions & 0 deletions build/update_requirejs.sh
Expand Up @@ -15,6 +15,13 @@ REQUIREJS_URI=`curl -f http://requirejs.org/docs/download.html 2>> /dev/null | \
grep -o 'http://requirejs.org/docs/release/[0-9]\.[0-9]\.[0-9]/minified/require.js'`
RJS_VERSION=`echo $REQUIREJS_URI | grep -o [0-9]\.[0-9]\.[0-9]`

# Don't update unless we have to
BASE_RJS_VERSION=`cat .rjs_version`
if [[ $RJS_VERSION = $BASE_RJS_VERSION ]] ; then
echo "You're version of requireJS is up to date with the latest stable version ($RJS_VERSION)" >& 2
exit 0
fi

echo "Fetching requireJS v$RJS_VERSION"
REQUIRE_PATH=`dirname $PWD`/js/libs/require
# If, for some reason, curl fails, we'll still have our old copy of require
Expand Down

0 comments on commit 5c2e907

Please sign in to comment.