Linux git automation installation script sharing

Source: Internet
Author: User
  code is as follows copy code


#!/bin/ SH
# Notes:git installer for CentOS
 
Echo-e n====================================================== ===== "
Echo-e" Ngit installer for CentOS 6.x. "
Echo-e "Nauthor:xiehai ~ qq:50083000."
Echo-e "n"
Echo-e "===========================================================n"
 
Export PATH= /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
 
echo-n "Your need Git" version (like. 1.8.5.5): "
Read version
 
Echo-e" Waiting ... 3 seconds "
Sleep 3
 
yum-y install gcc make Curl Curl-devel zlib-devel openssl-develPerl perl-devel cpio expat-devel gettext-devel
 
cd/usr/local/src
 
If [-S git-$version. tar.gz ]; Then
Echo git-$version. tar.gz [found]
Else
Echo error:git-$version. tar.gz not Found!!! Download Now ... "
Wget-c https://github.com/git/git/archive/v$version.tar.gz-o git-$version. tar.gz
Fi
&NBSP
Tar zxvf git-$version. tar.gz
CD git-$version
autoconf
./configure
Make && make install
 
git--version

Note: Git clone http://username:password@domain.com/developteam/ecstore.git

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.