Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iric-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinfo_iric
iric-data
Commits
2979e655
Commit
2979e655
authored
5 years ago
by
Jonathan Seguin
Browse files
Options
Downloads
Patches
Plain Diff
Add url parameter
parent
a3d92d59
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/iric-data.sh
+14
-7
14 additions, 7 deletions
tools/iric-data.sh
with
14 additions
and
7 deletions
tools/iric-data.sh
+
14
−
7
View file @
2979e655
...
...
@@ -2,12 +2,7 @@
action
=
$1
arg2
=
$2
BASE_URL
=
http://binfo06.iric.ca:8000
LOGIN_URL
=
${
BASE_URL
}
/login
FILE_UPLOAD_URL
=
${
BASE_URL
}
/secure/servlet/datafiles/upload
COOKIES
=
.iricdata.cookies.txt
CURL_BIN
=
"curl -c
$COOKIES
-b
$COOKIES
-e
$LOGIN_URL
"
BASE_URL
=
https://data.iric.ca
help
()
{
echo
"To download files in a dataset, provide
\"
get
\"
as first argument, followed by a dataset ID."
...
...
@@ -19,6 +14,9 @@ help() {
echo
""
echo
"To avoid being prompted for your username and password combination. Place your username on the first line "
echo
"and password on the 2nd line of a file named .auth alongside this script."
echo
""
echo
"The service url defaults to
$BASE_URL
. This may be overriden with the --url parameter."
echo
"ex. ./iric-data.sh get 321 --url http://binfo06.iric.ca:8000"
}
login
()
{
...
...
@@ -50,7 +48,7 @@ if [ -z "$action" ]; then
exit
fi
LONG
=
annotation:,lab:,dataset:,as-user:,help
LONG
=
annotation:,lab:,dataset:,as-user:,
url:,
help
OPTS
=
$(
getopt
--long
$LONG
--name
"
$0
"
--
"
$@
"
)
if
[
$?
!=
0
]
;
then
exit
1
;
fi
eval set
--
"
$OPTS
"
...
...
@@ -73,6 +71,10 @@ while true ; do
AS_USER
=
"
$2
"
shift
2
;;
--url
)
BASE_URL
=
"
$2
"
shift
2
;;
--help
)
help
exit
...
...
@@ -88,6 +90,11 @@ while true ; do
esac
done
LOGIN_URL
=
${
BASE_URL
}
/login
FILE_UPLOAD_URL
=
${
BASE_URL
}
/secure/servlet/datafiles/upload
COOKIES
=
.iricdata.cookies.txt
CURL_BIN
=
"curl -c
$COOKIES
-b
$COOKIES
-e
$LOGIN_URL
"
case
"
$action
"
in
"get"
)
dataset_id
=
$arg2
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment