Last active
August 29, 2015 14:05
-
-
Save lpil/b3bedc6a5fa6ad6d0d76 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 | |
# Jekyll sync and rebuild sites in subdirs | |
path = Dir.pwd | |
Dir.glob('*/').each do |website_dir| | |
Dir.chdir path + '/' + website_dir | |
puts "\e[32m#{Dir.pwd}\e[0m" | |
output = `git pull` | |
if result.match(/Already up\-to\-date\./) | |
puts 'Nothing to change' | |
next | |
end | |
puts output | |
`git submodule update --init` | |
puts `jekyll build` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment