-
-
Save leejarvis/d3a8977f523f95eba8f6 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
def get_files(url, file, destination) | |
case File.extname(file) | |
when ".tar.gz", ".zip" | |
unpack_archive(url, file, description) | |
when ".git" | |
git "destination" do | |
repository "#{url}/#{file}" | |
reference "master" | |
user node["apache"]["user"] | |
action :sync | |
end | |
else | |
raise ArgumentError, "dunno how to handle #{file}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment