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
8be7d90c
Commit
8be7d90c
authored
Aug 21, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address comments on #484.
parent
be94e176
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
setup-test-dirs.sh
+16
-12
No files found.
setup-test-dirs.sh
100644 → 100755
View file @
8be7d90c
#!/
bin/
bash
#!/
usr/bin/env
bash
# Create symlinks from ~/mitx_all/data or $ROOT/data, with root passed as first arg
# to all the test courses in mitx/common/test/data/
ROOT
=
$HOME
/mitx_all
# If there is a parameter, and it's a dir, assuming that's the path to
# the edX root dir, with data and mitx inside it
if
[
-d
"
$1
"
]
;
then
ROOT
=
$1
# posix compliant sanity check
if
[
-z
$BASH
]
||
[
$BASH
=
"/bin/sh"
]
;
then
echo
"Please use the bash interpreter to run this script"
exit
1
fi
if
[
!
-d
"
$ROOT
"
]
;
then
ROOT
=
"
${
1
:-
$HOME
/mitx_all
}
"
if
[[
!
-d
"
$ROOT
"
]]
;
then
echo
"'
$ROOT
' is not a directory"
exit
1
fi
if
[
!
-d
"
$ROOT
/mitx"
]
;
then
if
[
[
!
-d
"
$ROOT
/mitx"
]
]
;
then
echo
"'
$ROOT
' is not the root mitx_all directory"
exit
1
fi
if
[
!
-d
"
$ROOT
/data"
]
;
then
if
[
[
!
-d
"
$ROOT
/data"
]
]
;
then
echo
"'
$ROOT
' is not the root mitx_all directory"
exit
1
fi
...
...
@@ -29,11 +29,15 @@ fi
echo
"ROOT is
$ROOT
"
cd
$ROOT
/data
for
course
in
`
ls
../mitx/common/test/data/
`
for
course
in
$(
/bin/ls ../mitx/common/test/data/
)
do
# Get rid of the symlink if it already exists
if
[[
-L
"
$course
"
]]
;
then
echo
"Removing link to '
$course
'"
rm
-f
$course
fi
echo
"Make link to '
$course
'"
rm
-f
"
$course
"
# Create it
ln
-s
"../mitx/common/test/data/
$course
"
done
...
...
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