~/checkout/ã¿ãããªå ´æã«gitã®ãªãã¸ããªãcloneãã¾ãã£ã¦ãã®ã ãã©ï¼æ°åã®ã¬ãã¤ãããããã£ãã®ã§ï¼æ°ããã³ã³ãã¥ã¼ã¿ã«ç§»ãã®ããããããï¼
cloneãããªãã¸ããªã®URLã®ãªã¹ããåã£ã¦ããã¦ï¼ãã®ãªãã¸ããªãå¿
è¦ã«ãªã£ãããªã¹ãããæ¢ãã¦æ°ããã³ã³ãã¥ã¼ã¿ã§cloneãç´ãï¼ã¨ãããã¨ã«ããï¼
ããããRubyã®ã¹ã¯ãªãããæ¸ãã¦ããï¼
Dir.pwd.tap{ |root| Dir.glob('*').each{ |path| File.join(root, path).tap{ |_| next unless File.directory? _ Dir.chdir _ } `git remote -v 2> /dev/null`.tap{ |_| puts _.split(/\s+/)[1] unless _.empty? } } }
~/checkout/ã¿ãããªå ´æã§å®è¡ãã¦çµæããã¡ã¤ã«ã«ä¿åãã¦ããï¼
% ruby ~/Dropbox/collect-git-url.rb | tee git-repository-list.txt ... [email protected]:hitode909/gigaschema.git [email protected]:hitode909/glitch-ime.git [email protected]:hitode909/google-chrome-kojiki.git ...
ãªãã¸ããªã®URLã並ãã ãã¡ã¤ã«ãã§ããã®ã§ï¼ãããåã£ã¦ããã°ï¼å¿
è¦ã«ãªã£ãã¨ãã«cloneãç´ããï¼