Sha256: cf45cf212a392f5e0d979435f6d68a6ceb4f2d4ababe492520c538f95e1d38b3
Contents?: true
Size: 556 Bytes
Versions: 18
Compression:
Stored size: 556 Bytes
Contents
#!/usr/bin/env ruby submodule_status = `git submodule status` updated_submodules = [] submodule_status.each_line do |line| # Submodules that are not updated start with a + in the submodule status # output. if line.match(/^\+/) # The second word is the submodule directory. updated_submodules << line.split(' ')[1] end end if updated_submodules.length > 0 puts 'The following git submodules are out of date:' updated_submodules.each do |submodule| puts "\t#{submodule}" end puts puts "Suggest: 'git submodule update'." end
Version data entries
18 entries across 18 versions & 1 rubygems