This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
canonicalize libraries: script to convert from Apache format to Nginx
Merge of Vid's #533 with some fixes.
- Loading branch information
1 parent
6e86835
commit 7c15cd8
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# | ||
# Converts pagespeed_libraries.conf from Apache-format to Nginx-format, | ||
# supporting the canonicalize_javascript_libraries filter. | ||
# Inspired by https://github.com/pagespeed/ngx_pagespeed/issues/532 | ||
# | ||
# Usage: | ||
# scripts/pagespeed_libraries_generator.sh > pagespeed_libraries.conf | ||
# | ||
# Then have nginx include that configuration file and enable the filter | ||
# canonicalize_javascript_libraries. | ||
# | ||
# Author: vid@zippykid.com (Vid Luther) | ||
# jefftk@google.com (Jeff Kaufman) | ||
|
||
URL="https://modpagespeed.googlecode.com/svn/trunk/src/" | ||
URL+="net/instaweb/genfiles/conf/pagespeed_libraries.conf" | ||
curl -s "$URL" \ | ||
| grep ModPagespeedLibrary \ | ||
| while read library size hash url ; do | ||
echo " pagespeed Library $size $hash $url;" | ||
done |