Created
July 16, 2009 20:30
-
-
Save tobias/148669 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/ruby | |
| url = ARGV[0] | |
| css_file = ARGV[1] | |
| strip = ARGV[2] | |
| File.open(css_file, 'r') do |f| | |
| while line = f.gets do | |
| match = line.match(/url\((.*?)\)/) | |
| if match | |
| file = match[1] | |
| file = file[strip.size..-1] if !strip.nil? and file =~ /^#{strip}/ | |
| `wget #{url}/#{file}` | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment