noot
This commit is contained in:
parent
3c62bd8185
commit
49d8058cbb
4
repotool
4
repotool
|
@ -352,19 +352,21 @@ EOF
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
local cloned="false"
|
||||||
# we check if we have cloned the repo via the if the .git folder exists
|
# we check if we have cloned the repo via the if the .git folder exists
|
||||||
if [[ ! -d .git ]]; then
|
if [[ ! -d .git ]]; then
|
||||||
# check if the remote actually exists
|
# check if the remote actually exists
|
||||||
$git ls-remote $repo_url > /dev/null && RC=$? || RC=$?
|
$git ls-remote $repo_url > /dev/null && RC=$? || RC=$?
|
||||||
if [[ $RC == 0 ]]; then
|
if [[ $RC == 0 ]]; then
|
||||||
$git clone $repo_url $target_dir >&2
|
$git clone $repo_url $target_dir >&2
|
||||||
|
cloned="true"
|
||||||
else
|
else
|
||||||
echo "Could not find repo: $repo_url"
|
echo "Could not find repo: $repo_url"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo dir=$target_dir domain=$domain path=$path repo_url=$repo_url
|
echo dir=$target_dir domain=$domain path=$path repo_url=$repo_url cloned=$cloned
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
[[ -z "$REPOTOOL_PATH" ]] && export REPOTOOL_PATH="$HOME/repo"
|
[[ -z "$REPOTOOL_PATH" ]] && export REPOTOOL_PATH="$HOME/repo"
|
||||||
|
|
||||||
alias repo=". $REPOTOOL_PATH/.bin/repotool.zsh"
|
alias repo=". $REPOTOOL_PATH/.bin/repotool.zsh"
|
||||||
|
|
Loading…
Reference in New Issue