dotfiles/.local/bin/scripts/git-get

7 lines
244 B
Text
Raw Normal View History

#!/bin/sh
# Clones from resolving the arguments and switches into the new directory
2021-06-19 21:24:14 +02:00
remote=$(git-repo "$@")
echo "Cloning $remote"
git clone $remote ${@:4} --recurse-submodules || return $?
cd "$(test $4 && echo $4 || basename ${remote%.git})"