tools/install: Accept the repository URL through env "OSH_REPOSITORY"

This commit is contained in:
nmarghetti 2020-12-18 01:09:17 +01:00 committed by Koichi Murase
parent 33859d9210
commit 575535636a

@ -230,6 +230,10 @@ _omb_install_main() {
OSH=~/.oh-my-bash
fi
if [[ ! $OSH_REPOSITORY ]]; then
OSH_REPOSITORY=https://github.com/ohmybash/oh-my-bash.git
fi
# Only enable exit-on-error after the non-critical colorization stuff,
# which may fail on systems lacking tput or terminfo
@ -261,7 +265,7 @@ _omb_install_main() {
return 1
fi
fi
_omb_install_run git clone --depth=1 https://github.com/ohmybash/oh-my-bash.git "$OSH" || {
_omb_install_run git clone --depth=1 "$OSH_REPOSITORY" "$OSH" || {
printf "Error: git clone of oh-my-bash repo failed\n"
return 1
}