#!/usr/bin/env bash # Copyright (c) Matthew Attaway, 2012-2013. All rights reserved # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE # SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. # User contributed content on the Perforce Public Depot is not supported by Perforce, # although it may be supported by its author. This applies to all contributions # even those submitted by Perforce employees. echo Grabbing build tools... sudo apt-get install -y build-essential echo Grabbing the required version of Git and its build dependencies... wget http://git-core.googlecode.com/files/git-1.7.11.3.tar.gz || exit 1 sudo apt-get -y install tk8.5 tcl8.5 || exit 1 sudo apt-get -y install autoconf || exit 1 sudo apt-get -y install gettext || exit 1 sudo apt-get -y install zlib1g-dev || exit 1 echo Buildng Git... tar xvzf git-1.7.11.3.tar.gz || exit 1 cd git-1.7.11.3 || exit 1 autoconf || exit 1 ./configure || exit 1 make || exit 1 make test || exit 1 sudo make install || exit 1 cd .. || exit 1 echo Grabbing the required versions of Python, P4Python, and the P4API sudo apt-get update || exit 1 sudo apt-get -y install python3 || exit 1 sudo apt-get -y install python3-dev || exit 1 # needed to build P4Python wget http://ftp.perforce.com/perforce/r12.3/bin.tools/p4python.tgz || exit 1 wget http://ftp.perforce.com/perforce/r12.2/bin.linux26x86_64/p4api.tgz || exit 1 wget http://ftp.perforce.com/perforce/r12.2/bin.linux26x86_64/p4 || exit 1 wget http://ftp.perforce.com/perforce/r12.2/bin.linux26x86_64/p4d || exit 1 echo Building P4Python... tar xvzf p4python.tgz || exit 1 tar xvzf p4api.tgz || exit 1 chmod +x p4 p4d || exit 1 sudo cp p4 /usr/local/bin/p4 || exit 1 mv p4 p4python-* || exit 1 mv p4d p4python-* || exit 1 cd p4python-* || exit 1 export PATH=.:$PATH || exit 1 python3 setup.py build --apidir ../p4api-2012.2.*/ || exit 1 python3 p4test.py || exit 1 sudo python3 setup.py install --apidir ../p4api-2012.2.*/ || exit 1 echo Testing the installation... || exit 1 echo import P4 > p4python_version_check.py || exit 1 echo 'print(P4.P4.identify())' >> p4python_version_check.py || exit 1 python3 p4python_version_check.py || exit 1 cd .. echo Install Git Fusion... wget http://ftp.perforce.com/perforce/r12.2/bin.noarch/git-fusion.tgz tar xvzf git-fusion.tgz sudo mv git-fusion /usr/local echo Creating git user account sudo adduser git echo "" echo "" echo Automated install complete. Now a few final bits to do manually... echo Add the following export lines to the top of your .bashrc echo 'export PATH=/usr/local/git-fusion/bin:$PATH' echo 'export P4USER=git-fusion-user' echo 'export P4PORT=<your Perforce port>' echo "" echo After updating your .bashrc file run: echo source /home/git/.bashrc echo 'p4gf_super_init.py --user <Perforce super user account>' echo Now either add user keys and/or run the following to create a repository echo p4gf_init_repo.py echo Switching you to the new git account to run the above steps... echo Done sudo su - git
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8300 | Matt Attaway |
Move Git Fusion install script into a separate project. Also divide scripts up by release |
||
//guest/matt_attaway/scripts/git-fusion-builder.sh | |||||
#2 | 8255 | Matt Attaway | Add all the legal fun stuff | ||
#1 | 8254 | Matt Attaway | Adding a simple script that installs Git Fusion from scratch on an Ubuntu 12.04 LTS machine |