Last active
June 17, 2018 15:51
-
-
Save nobiki/b34956be442fb1b0a7074ab3bb7236ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # | |
| # 説明: | |
| # カレントディレクトリにある空のディレクトリを検出して、 | |
| # ディレクトリが空であればREPO_URLからgit cloneするワンライナー | |
| ACCOUNT_NAME=nobiki | |
| # REPO_URL="https://${ACCOUNT_NAME}@example.com/nobiki/" | |
| REPO_URL="git@example.com:${ACCOUNT_NAME}/" | |
| find ./ -type d -maxdepth 1 -empty | sed -e "s/\.\///g" | while read line; do echo -e "\e[1;32m-> $line \n \e[m" && git clone --recursive "$REPO_URL$line.git"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment