mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
add github repo url
This commit is contained in:
@@ -9,3 +9,13 @@ GREP_PATH=$(unalias grep &> /dev/null; which grep) || display_error "$GREP_ERROR
|
||||
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
|
||||
}
|
||||
+1
-1
@@ -21,7 +21,7 @@ read_command_line() {
|
||||
show_usage
|
||||
exit 1
|
||||
fi
|
||||
GO_SOURCE_URL=https://go.googlesource.com/go
|
||||
GO_SOURCE_URL=https://github.com/golang/go.git
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-s=*|--source=*)
|
||||
|
||||
+2
-1
@@ -32,7 +32,8 @@ read_command_line "$@"
|
||||
echo
|
||||
display_message "gvm gos (available)"
|
||||
echo
|
||||
versions=$(git ls-remote -t https://go.googlesource.com/go | awk -F/ '{ print $NF }' | $SORT_PATH)
|
||||
go_repo_url=repo_url
|
||||
versions=$(git ls-remote -t ${go_repo_url} | awk -F/ '{ print $NF }' | $SORT_PATH)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
display_fatal "Failed to get version list from Google"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user