-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfossology-client.run
More file actions
executable file
·40 lines (33 loc) · 976 Bytes
/
fossology-client.run
File metadata and controls
executable file
·40 lines (33 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#
# Software Name : Fossology Helper Tools
# Version: 1.0
# Copyright (c) 2019 Orange Business Services
# SPDX-License-Identifier: MIT
#
# This software is distributed under the MIT License
# the text of which is available at https://spdx.org/licenses/MIT.html
# or see the "license.txt" file for more details.
#
# Author: Nicolas Toussaint nicolas1.toussaint@orange.com
# Software description: Fossology helper tools
#
# Usage:
# fossoloy-client.run <args...>
#
# To automatically mount the file inside the Docker container, replace
# the usual '-i' option with '-I' and place it as first option.
#
# Example: fossoloy-client.run -I <input-file> <other args>
#
reg=# <- Configure this
img=fossology-client
if [ "$1" = "-I" ]
then
in_file="$(readlink -f $2)"
shift 2
docker_mp="/mnt/$(basename $in_file | tr ' ' '_')"
mount="-v $in_file:$docker_mp:ro"
opt_i="-i $docker_mp"
fi
docker run --rm $mount $reg:$img ./upload-rest.sh $opt_i "$@"