Git for Mac: Difference between revisions
From MoodleDocs
m (added link to spanish translation of page) |
m (tidy up) |
||
Line 1: | Line 1: | ||
This GIT installer for Mac OS X is part of the installation package Moodle4Mac by Ralf Krause | This GIT installer for Mac OS X is part of the installation package [http://download.moodle.org/macosx/ Moodle4Mac] by Ralf Krause | ||
==Code== | ==Code== |
Revision as of 13:36, 17 September 2013
This GIT installer for Mac OS X is part of the installation package Moodle4Mac by Ralf Krause
Code
#! /bin/sh # # This GIT installer for Mac OS X is part # of the installation package Moodle4Mac # # 20130514 - Ralf Krause #
echo echo "+--------------------------------------------+" echo "| GIT updater for your local Moodle server" echo "+--------------------------------------------+" echo
cd /Applications/MAMP/htdocs
if ! test -e moodle25/.git ; then ## the first git update must get everything including .git git clone --depth 1 -b MOODLE_25_STABLE git://github.com/moodle/moodle.git moodle25-git if test -e moodle25 ; then if test -e moodle25/config.php ; then cp moodle25/config.php moodle25-git/. fi DATE=`date +%Y%m%d-%H%M` mv moodle25 moodle25-$DATE fi mv moodle25-git moodle25 ## the old folder can be deleted now ## if you want to do this please remove '##' from the following line ## sudo rm -R moodle25-* else ## the next git update only gets the new files cd moodle25 git pull cd .. fi