Git updated
This commit is contained in:
parent
6bb9442c43
commit
f61f09b83f
32
install/git
32
install/git
@ -10,29 +10,31 @@ echo
|
|||||||
installed() {
|
installed() {
|
||||||
command -v "$1" >/dev/null 2>&1
|
command -v "$1" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
||||||
|
|
||||||
! installed make && sudo apt install -y make
|
! installed make && sudo apt install -y make
|
||||||
|
|
||||||
if installed git; then
|
if installed git; then
|
||||||
sudo rm -rf /usr/src/git
|
if [ -d "${HOME}/install/git" ]; then
|
||||||
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
|
cd /usr/src/git/ && \
|
||||||
sudo chown -R $USER: /usr/src/git
|
git pull
|
||||||
|
else
|
||||||
|
git clone https://github.com/git/git.git --depth=1 "${HOME}/install/git" && \
|
||||||
cd /usr/src/git/
|
cd /usr/src/git/
|
||||||
sudo make prefix=/usr/local all
|
fi
|
||||||
|
sudo make prefix=/usr/local all && \
|
||||||
sudo make prefix=/usr/local install
|
sudo make prefix=/usr/local install
|
||||||
else
|
else
|
||||||
! installed wget && sudo apt install -y wget
|
! installed wget && sudo apt install -y wget
|
||||||
wget https://github.com/git/git/archive/master.zip -O /tmp/git.zip
|
[ -d "${HOME}/install/git" ] || mkdir -p "${HOME}/install/git"
|
||||||
sudo unzip -q /tmp/git.zip -d /usr/src/git
|
wget https://github.com/git/git/archive/master.zip -O /tmp/git.zip && \
|
||||||
rm /tmp/git.zip
|
unzip -q /tmp/git.zip -d "${HOME}/install/git" && \
|
||||||
cd /usr/src/git/git-master
|
rm /tmp/git.zip && \
|
||||||
sudo make prefix=/usr/local all
|
cd "${HOME}/install/git/git-master" && \
|
||||||
sudo make prefix=/usr/local install
|
sudo make prefix=/usr/local all && \
|
||||||
cd /usr/src
|
sudo make prefix=/usr/local install && \
|
||||||
sudo rm -rf git
|
cd - && \
|
||||||
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
|
rm -rf git && \
|
||||||
sudo chown -R $USER: /usr/src/git
|
git clone https://github.com/git/git.git --depth=1 "${HOME}/install/git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git --version
|
git --version
|
||||||
|
Loading…
Reference in New Issue
Block a user