Created
August 28, 2019 03:12
-
-
Save sirhc/65d40f6a590891a61ef7d4b431a02770 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
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\t\n' | |
PATH='/usr/bin:/usr/local/bin' | |
while read -r line; do | |
[[ $line =~ ^\s*$ ]] && continue | |
[[ $line =~ ^\s*# ]] && continue | |
dir="$(basename "$line")" | |
dir="${dir%.git}" | |
printf '[%s]\n' "$dir" | |
printf 'checkout = git clone '"'"'%s'"'"' '"'"'%s'"'"'\n' "$line" "$dir" | |
printf '\n' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment