logo

dotfiles

My dotfiles, one branch per machine, rebased on base git clone https://hacktivis.me/git/dotfiles.git
commit: 9ab3d2a2d65dd9fb7d43cc5b16ada5ffb34441ad
parent 1ee9ab53eb6cb0d8c6e2ce5f856b3a274c492083
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 18 Feb 2022 23:41:21 +0100

.common.sh: Add gitclone function

Diffstat:

M.common.sh10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/.common.sh b/.common.sh @@ -210,6 +210,16 @@ ver_bump() { git add "${2}/../Manifest" } +gitclone() { + url="$1" + dir=$(echo "$1" | sed -E -e 's;^(https?://|git:);'$HOME'/Sources/git/;' -e 's;.git$;;') + + test -e "$dir" || git clone "$1" "$dir" + + cd "$dir" +} + + # startup stty sane # I can haz urandom