Created
September 11, 2019 05:49
-
-
Save oosawa/eac3e7145199e8a87ae4efc5379f74fa 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
# frozen_string_literal: true | |
dirs = Dir.glob('*/') | |
pwd = Dir.pwd | |
dirs.each do |dir| | |
# git の管理下にありそうな場合はそこに移動して fetch する | |
next unless Dir.exist?("#{pwd}/#{dir}.git/") | |
Dir.chdir "#{pwd}/#{dir}" | |
system 'git fetch' | |
puts Dir.pwd | |
puts 'git fetch' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment