Last active
August 29, 2015 14:10
-
-
Save mubeeniqbal/e0ca2d3c7a56d5549097 to your computer and use it in GitHub Desktop.
Clone all listed git repositories.
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
#!/usr/bin/env bash | |
# | |
# Clone all listed git repositories. | |
# Add/edit repo URLs to clone. Comment those you don't want to. | |
# Make sure you are inside the directory where you want to clone the git | |
# repositories before you run this script. | |
# | |
# Respective cloned folders are named after the keys in the array. | |
# Git repos array. | |
declare -A REPOS | |
REPOS['conky-i3bar']='https://gist.github.com/abc233276c3185dac15b.git' | |
REPOS['conkyrc']='https://gist.github.com/80b22b024fee53f11959.git' | |
REPOS['i3config']='https://gist.github.com/ed308becaa661a1a92bb.git' | |
REPOS['i3exit']='https://gist.github.com/3a17e7086d0fb039a818.git' | |
REPOS['i3status']='https://gist.github.com/354400b6a66b25382e4a.git' | |
REPOS['snp']='https://gist.github.com/81fd74d5e8cf522c780f.git' | |
REPOS['update-files']='https://gist.github.com/8654310f2698f53bf030.git' | |
REPOS['Xresources']='https://gist.github.com/2317a91aa7cab8eae295.git' | |
# Make repos array constant. | |
readonly REPOS | |
main() { | |
echo 'Cloning all git repositories...' | |
local key | |
for key in "${!REPOS[@]}"; do | |
echo -e "\n>>> ${key}" | |
echo "URL: ${REPOS[${key}]}" | |
git clone "${REPOS[${key}]}" "${key}" || return | |
done | |
exit 0 | |
} | |
main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment