mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
21 lines
737 B
Bash
21 lines
737 B
Bash
#!/usr/bin/env bash
|
|
LS_ERROR="GVM couldn't find ls"
|
|
GREP_ERROR="GVM couldn't find grep"
|
|
SORT_ERROR="GVM couldn't find sort"
|
|
HEAD_ERROR="GVM couldn't find head"
|
|
|
|
LS_PATH=$(unalias ls &> /dev/null; which ls) || display_error "$LS_ERROR" || return 1
|
|
GREP_PATH=$(unalias grep &> /dev/null; which grep) || display_error "$GREP_ERROR" || return 1
|
|
SORT_PATH=$(unalias sort &> /dev/null; which sort) || display_error "$SORT_ERROR" || return 1
|
|
HEAD_PATH=$(unalias head &> /dev/null; which head) || display_error "$HEAD_ERROR" || return 1
|
|
|
|
GITHUB_REPO_URL=https://github.com/golang/go.git
|
|
GOOGLE_REPO_URL=https://go.googlesource.com/go
|
|
|
|
repo_url() {
|
|
if [[ "$GOOGLE" == "true" ]]; then
|
|
return GOOGLE_REPO_URL
|
|
else
|
|
return GITHUB_REPO_URL
|
|
fi
|
|
} |