1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

[breaking change] remove direct reference to fastgit

fastgit may be blocked by GFW (see https://t.me/fastgitchannel/81), so
hard-coding its URL is not a good option. Using git URL rewrite feature
is a better choice: https://jdhao.github.io/2021/11/27/git_notes_s4/#use-a-git-mirror-site-for-cloning.

This is a breaking change, since previously I use hub.fastgit.org as the
url, now the url will be default github.com unless the user change it
using the above mentioned method to change the cloning URL.
This commit is contained in:
jdhao 2022-02-08 13:08:16 +08:00
parent 0aed2b42ac
commit 15dfccf81e
2 changed files with 5 additions and 15 deletions

View File

@ -125,7 +125,7 @@ fi
#######################################################################
RIPGREP_DIR=$HOME/tools/ripgrep
RIPGREP_SRC_NAME=$HOME/packages/ripgrep.tar.gz
RIPGREP_LINK="https://hub.fastgit.org/BurntSushi/ripgrep/releases/download/12.0.0/ripgrep-12.0.0-x86_64-unknown-linux-musl.tar.gz"
RIPGREP_LINK="https://github.com/BurntSushi/ripgrep/releases/download/12.0.0/ripgrep-12.0.0-x86_64-unknown-linux-musl.tar.gz"
if [[ -z "$(command -v rg)" ]] && [[ ! -f "$RIPGREP_DIR/rg" ]]; then
echo "Install ripgrep"
if [[ ! -f $RIPGREP_SRC_NAME ]]; then
@ -163,7 +163,7 @@ fi
#######################################################################
CTAGS_SRC_DIR=$HOME/packages/ctags
CTAGS_DIR=$HOME/tools/ctags
CTAGS_LINK="https://hub.fastgit.org/universal-ctags/ctags.git"
CTAGS_LINK="https://github.com/universal-ctags/ctags.git"
if [[ ! -f "$CTAGS_DIR/bin/ctags" ]]; then
echo "Install ctags"
@ -219,10 +219,10 @@ if [[ -d "$NVIM_CONFIG_DIR" ]]; then
mv "$NVIM_CONFIG_DIR" "$NVIM_CONFIG_DIR.backup"
fi
git clone --depth=1 https://hub.fastgit.org/jdhao/nvim-config.git "$NVIM_CONFIG_DIR"
git clone --depth=1 https://github.com/jdhao/nvim-config.git "$NVIM_CONFIG_DIR"
echo "Installing packer.nvim"
git clone --depth=1 https://hub.fastgit.org/wbthomason/packer.nvim \
git clone --depth=1 https://github.com/wbthomason/packer.nvim \
~/.local/share/nvim/site/pack/packer/opt/packer.nvim
echo "Installing nvim plugins, please wait"

View File

@ -4,14 +4,7 @@ local fn = vim.fn
vim.g.package_home = fn.stdpath("data") .. "/site/pack/packer/"
local packer_install_dir = vim.g.package_home .. "/opt/packer.nvim"
local plug_url_format = ""
if vim.g.is_linux then
plug_url_format = "https://hub.fastgit.org/%s"
else
plug_url_format = "https://github.com/%s"
end
local packer_repo = string.format(plug_url_format, "wbthomason/packer.nvim")
local packer_repo = "https://github.com/wbthomason/packer.nvim"
local install_cmd = string.format("10split |term git clone --depth=1 %s %s", packer_repo, packer_install_dir)
-- Auto-install packer in case it hasn't been installed.
@ -365,9 +358,6 @@ require("packer").startup({
config = {
max_jobs = 16,
compile_path = util.join_paths(vim.fn.stdpath('config'), 'lua', 'packer_compiled.lua'),
git = {
default_url_format = plug_url_format,
},
},
})