From 688e1745ae225af877a3159138546301487b69e9 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Wed, 23 Jul 2014 09:11:30 +0800 Subject: [PATCH] Updating readme file with new install method --- README.rst | 59 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/README.rst b/README.rst index c376112..a338bba 100644 --- a/README.rst +++ b/README.rst @@ -29,38 +29,36 @@ Also check the `wiki `_. Installation ============ -Ubuntu package --------------- +Python package (recommended) +---------------------------- -*This method is currently not recommended, the package is outdated. Maintainer wanted!* +You need the `pip `_ to do this:: -:: + sudo pip install moodle-sdk + mdk init - sudo apt-add-repository ppa:2x1cq-fred-7nqa6/ppa - sudo apt-get update - sudo apt-get install moodle-sdk - # Most settings are probably good as they are, just configure your remote and database engines. - sudo mdk init - # The next line prevents you from logging out and in again. - sudo su `whoami` +That's it! -You're done! -Try the following command to create a typical Stable Master instance (this will take some time because the cache is still empty) +### Optional -:: +Activate auto completion:: + + sudo ln -s $(python -c "import os, pkg_resources; print os.path.abspath(pkg_resources.resource_filename('mdk', 'tools/bash_completion'))") - mdk create - mdk list +Activate ``gt`` and ``gtd`` commands:: -Now you should be able to access it from ``http://moodle-sdk/stable_master``. + echo $(python -c "import os, pkg_resources; print '. ' + os.path.abspath(pkg_resources.resource_filename('mdk', 'tools/goto_instance'))") >> ~/.bashrc + echo $(python -c "import os, pkg_resources; print '. ' + os.path.abspath(pkg_resources.resource_filename('mdk', 'tools/goto_instance.bash_completion'))") >> ~/.bashrc -Mac OS ------- + +Homebrew +-------- Using `Homebrew `_, please refer to this `formula `_. -Manual installation -------------------- + +Git +--- ### 1. Clone the repository @@ -92,18 +90,23 @@ Assuming that you are using Apache, which is set up to serve the files from /var mkdir ~/www sudo ln -s ~/www /var/www/m - sudo mdk init + mdk init -### 5. Done +You're all set. -Try the following command to create a typical Stable Master instance (this will take some time because the cache is still empty): +### Optional -:: +To activate bash completion:: + + sudo ln -s /opt/moodle-sdk/extra/bash_completion /etc/bash_completion.d/moodle-sdk + +To activate goto commands (``gt`` and ``gtd``), add the following to ~/.bashrc:: - mdk create - mdk list + if [ -f /opt/moodle-sdk/extra/goto_instance ]; then + . /opt/moodle-sdk/extra/goto_instance + . /opt/moodle-sdk/extra/goto_instance.bash_completion + fi -Now you should be able to access it from http://localhost/m/stable_master. Command list ============ -- 2.11.0