#!/bin/bash set -eu for arg in "$@" do dir=${arg#*:} dir="$HOME"/src/${dir%/*} mkdir -pv "$dir" cd "$dir" git clone --verbose --progress "$arg" done