Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
178cdc87
Commit
178cdc87
authored
May 31, 2012
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing mercurial from brew install list
parent
a385dc4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
23 deletions
+54
-23
brew-formulas.txt
+0
-1
create-dev-env.sh
+54
-22
No files found.
brew-formulas.txt
View file @
178cdc87
...
...
@@ -3,7 +3,6 @@ sqlite
gdbm
pkg-config
gfortran
mercurial
python
yuicompressor
node
create-dev-env.sh
View file @
178cdc87
#!/bin/bash
set
-e
trap
"ouch"
ERR
ouch
()
{
printf
'\E[31m'
cat
<<
EOL
!! ERROR !!
The last command did not complete successfully,
see
$LOG
for more details or trying running the
script again with the -v flag.
EOL
}
error
()
{
printf
'\E[31m'
;
echo
"
$@
"
;
printf
'\E[0m'
}
...
...
@@ -31,7 +46,24 @@ info() {
EO
}
clone_repos
()
{
cd
"
$BASE
"
output
"Cloning mitx"
if
[[
-d
"
$BASE
/mitx"
]]
;
then
mv
"
$BASE
/mitx"
"
${
BASE
}
/mitx.bak.
$$
"
fi
git clone git@github.com:MITx/mitx.git
>>
$LOG
output
"Cloning askbot-devel"
if
[[
-d
"
$BASE
/askbot-devel"
]]
;
then
mv
"
$BASE
/askbot-devel"
"
${
BASE
}
/askbot-devel.bak.
$$
"
fi
git clone git@github.com:MITx/askbot-devel
>>
$LOG
output
"Cloning data"
if
[[
-d
"
$BASE
/data"
]]
;
then
mv
"
$BASE
/data"
"
${
BASE
}
/data.bak.
$$
"
fi
hg clone ssh://hg-content@gp.mitx.mit.edu/data
>>
$LOG
}
PROG
=
${
0
##*/
}
BASE
=
"
$HOME
/mitx_all"
...
...
@@ -40,8 +72,8 @@ RUBY_DIR="$BASE/ruby"
RUBY_VER
=
"1.9.3"
NUMPY_VER
=
"1.6.2"
SCIPY_VER
=
"0.10.1"
BREW_FILE
=
"
$BASE
/mitx/brew-formulas.txt"
LOG
=
"/var/tmp/install.log"
BREW_PKGS
=
"
$BASE
/mit/brew-formulas.txt"
APT_PKGS
=
"curl git mercurial python-virtualenv build-essential python-dev gfortran liblapack-dev libfreetype6-dev libpng12-dev libxml2-dev libxslt-dev yui-compressor coffeescript"
if
[[
$EUID
-eq
0
]]
;
then
...
...
@@ -49,7 +81,6 @@ if [[ $EUID -eq 0 ]]; then
usage
exit
1
fi
ARGS
=
$(
getopt
"cvh"
"
$*
"
)
if
[[
$?
!=
0
]]
;
then
usage
...
...
@@ -121,11 +152,12 @@ case `uname -s` in
output
"Installing ubuntu requirements"
sudo
apt-get
-y
update
sudo
apt-get
-y
install
$APT_PKGS
clone_repos
;;
*
)
error
"Unsupported distribution -
$distro
"
exit
1
;;
;;
esac
;;
Darwin
)
...
...
@@ -133,9 +165,24 @@ case `uname -s` in
output
"Installing brew"
/usr/bin/ruby
-e
"
$(
curl
-fsSL
https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb
)
"
}
command
-v
git &>/dev/null
||
{
output
"Installing git"
brew install git
>>
$LOG
}
command
-v
hg &>/dev/null
||
{
output
"Installaing mercurial"
brew install mercurial
>>
$LOG
}
clone_repos
output
"Installing OSX requirements"
if
[[
!
-r
$BREW_FILE
]]
;
then
error
"
$BREW_FILE
does not exist, needed to install brew deps"
exit
1
fi
# brew errors if the package is already installed
for
pkg
in
$(
cat
$BREW_
PKGS
)
;
do
for
pkg
in
$(
cat
$BREW_
FILE
)
;
do
grep
$pkg
<
(
brew list
)
&>/dev/null
||
{
output
"Installing
$pkg
"
brew install
$pkg
>>
$LOG
...
...
@@ -156,22 +203,6 @@ case `uname -s` in
;;
esac
cd
"
$BASE
"
output
"Cloning mitx, askbot and data repos"
if
[[
-d
"
$BASE
/mitx"
]]
;
then
mv
"
$BASE
/mitx"
"
${
BASE
}
/mitx.bak.
$$
"
fi
git clone git@github.com:MITx/mitx.git
>>
$LOG
if
[[
-d
"
$BASE
/askbot-devel"
]]
;
then
mv
"
$BASE
/askbot-devel"
"
${
BASE
}
/askbot-devel.bak.
$$
"
fi
git clone git@github.com:MITx/askbot-devel
>>
$LOG
if
[[
-d
"
$BASE
/data"
]]
;
then
mv
"
$BASE
/data"
"
${
BASE
}
/data.bak.
$$
"
fi
hg clone ssh://hg-content@gp.mitx.mit.edu/data
>>
$LOG
output
"Installing rvm and ruby"
curl
-sL
get.rvm.io | bash
-s
stable
source
$RUBY_DIR
/scripts/rvm
...
...
@@ -181,7 +212,8 @@ source $PYTHON_DIR/bin/activate
output
"Installing gem bundler"
gem install bundler
output
"Installing ruby packages"
cd
$BASE
/mitx
# hack :(
cd
$BASE
/mitx
||
true
bundle install
cd
$BASE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment