Partage » irods-http-url.sh
| 1 |
#! /bin/bash
|
|---|---|
| 2 |
|
| 3 |
path=$1 |
| 4 |
|
| 5 |
coll=$(dirname "$path") |
| 6 |
data=$(basename "$path") |
| 7 |
|
| 8 |
# Test if path is relative
|
| 9 |
if [ $(realpath -m "$coll") != "$coll" ] ; then |
| 10 |
# use ipwd to get absolute collection name
|
| 11 |
coll=$(realpath -m "$(ipwd)/$coll") |
| 12 |
fi
|
| 13 |
|
| 14 |
# build URL
|
| 15 |
iquest "https://%s%s/%s" "SELECT RESC_LOC, COLL_NAME, DATA_NAME WHERE DATA_NAME = '$data' AND COLL_NAME = '$coll'" |
- « Précédent
- 1
- 2
- 3
- 4
- Suivant »