common/travis/fetch_upstream.sh: try chroot-git then git

This commit is contained in:
maxice8 2019-03-06 23:14:51 -03:00 committed by Michael Aldridge
parent 548c3dab25
commit 44d393bc38
1 changed files with 7 additions and 1 deletions

View File

@ -2,5 +2,11 @@
#
# changed_templates.sh
if command -v chroot-git >/dev/null 2>&1; then
GIT_CMD=$(command -v chroot-git)
elif command -v git >/dev/null 2>&1; then
GIT_CMD=$(command -v git)
fi
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 git://github.com/void-linux/void-packages.git master
$GIT_CMD fetch --depth 200 git://github.com/void-linux/void-packages.git master