Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
configuration
Commits
e3d70a16
Commit
e3d70a16
authored
Aug 23, 2016
by
Ned Batchelder
Committed by
GitHub
Aug 23, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3338 from edx/ned/install-sh-arg-parsing
Improved argument parsing
parents
9683a759
cdbb989c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
util/install/install_stack.sh
+23
-19
No files found.
util/install/install_stack.sh
View file @
e3d70a16
...
...
@@ -12,9 +12,7 @@ function usage
{
cat
<<
EOM
--- install_stack.sh ---
Usage:
$
bash install_stack.sh stack release [-b vagrant_mount_base] [-v] [-h]
Usage:
$
bash
${
0
##*/
}
[-b mount_base] [-v] [-h] STACK [RELEASE]
Installs the Open edX devstack or fullstack. If you encounter any trouble
or have questions, head over to https://open.edx.org/getting-help.
...
...
@@ -28,7 +26,7 @@ function usage
Installing multiple versions of devstack can often cause conflicts that
this script is not prepared to handle.
stack
STACK
Either 'fullstack' or 'devstack'. Fullstack mimics a production
environment, whereas devstack is useful if you plan on modifying the
Open edX code. You must specify this.
...
...
@@ -39,10 +37,10 @@ function usage
If you choose devstack, 'release' should be the latest Open edX
release or master.
release
The release of Open edX
you wish to run. Install the given git ref
'release'. You must specify this. Open edX releases are called
"open-release/eucalyptus.
1", "open-release/eucalyptus.
2", and so on.
RELEASE
The release of Open edX
to install. Defaults to \
$OPENEDX_RELEASE
.
Open edX releases are called "open-release/eucalyptus.1",
"open-release/eucalyptus.2", and so on.
We recommend the latest stable open release for general members of the
open source community. Details on available open releases can be found
...
...
@@ -50,7 +48,7 @@ function usage
If you plan on modifying the code, we recommend the "master" branch.
-b
vagrant_
mount_base
-b mount_base
Customize the location of the source code that gets cloned during the
devstack provisioning. The default is the current directory. This
option is not valid if installing fullstack.
...
...
@@ -77,16 +75,6 @@ release=""
# Vagrant source code provision location
vagrant_mount_location
=
""
if
[[
$#
-lt
2
||
${
1
:0:1
}
==
'-'
||
${
2
:0:1
}
==
'-'
]]
;
then
usage
exit
1
fi
stack
=
$1
shift
release
=
$1
shift
while
getopts
"b:vh"
opt
;
do
case
"
$opt
"
in
b
)
...
...
@@ -111,6 +99,22 @@ while getopts "b:vh" opt; do
esac
done
shift
"
$((
OPTIND-1
))
"
# Shift off the options we've already parsed
# STACK is a required positional argument.
stack
=
$1
shift
# RELEASE is an optional position argument, defaulting to OPENEDX_RELEASE.
release
=
${
1
-
$OPENEDX_RELEASE
}
shift
# If there are positional arguments left, something is wrong.
if
[[
$1
]]
;
then
usage
exit
1
fi
exec
>
>(
tee install-
$(
date +%Y%m%d-%H%M%S
)
.log
)
2>&1
echo
"Capturing output to install-
$(
date +%Y%m%d-%H%M%S
)
.log."
echo
"Installation started at
$(
date
'+%Y-%m-%d %H:%M:%S'
)
"
...
...
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