Корректировка git

This commit is contained in:
2022-01-08 14:17:50 +08:00
parent 41b6cfbfb3
commit 3db1b4ba9b

View File

@@ -1,12 +1,14 @@
#!/bin/bash #!/bin/bash
. "../src/01-common.sh" || exit 5 echo
title "Installing git..." echo "==============================================="
echo "Installing git..."
echo "==============================================="
echo
if installed 'git'; then if installed git; then
[ ! -d "/usr/src/git" ] && sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git [ ! -d "/usr/src/git" ] && sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git sudo chown -R anthony: /usr/src/git
cd /usr/src/git/ cd /usr/src/git/
# sudo git pull
sudo make prefix=/usr/local all sudo make prefix=/usr/local all
sudo make prefix=/usr/local install sudo make prefix=/usr/local install
else else
@@ -21,4 +23,4 @@ else
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git sudo chown -R anthony: /usr/src/git
fi fi
success "$(git --version)" git --version