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

9 lines
265 B
Text
Raw Normal View History

#!/bin/sh
# Clones from resolving the arguments and switches into the new directory
2022-01-12 12:44:28 +01:00
# ARGS see git-repo
2021-07-09 09:08:11 +02:00
set -e
2021-06-19 21:24:14 +02:00
remote=$(git-repo "$@")
echo "Cloning $remote"
2021-07-09 09:08:11 +02:00
git clone $remote ${@:4} --recurse-submodules
cd "$(test -n "$2" && echo "$2" || basename ${remote%.git})"