File: dlf

package info (click to toggle)
ruby-license-finder 7.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,356 kB
  • sloc: ruby: 6,017; sh: 144; python: 31; makefile: 14
file content (21 lines) | stat: -rwxr-xr-x 625 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
if `which docker > /dev/null`; then
  if [ $# -eq 0 ]; then
    docker run -v $PWD:/scan -it licensefinder/license_finder
  else
    escaped_params=""
    for p in "$@"; do
      escaped_params="$escaped_params \"$p\""
    done
    if [[ $escaped_params =~ "&&" ]]; then
      command=${escaped_params:2:${#escaped_params}-3}
    else
      command=$escaped_params
    fi
    docker run -v $PWD:/scan -it licensefinder/license_finder /bin/bash -lc "cd /scan && $command"
  fi
else
  echo "You do not have docker installed. Please install it:"
  echo "    https://docs.docker.com/engine/installation/"
  exit 1
fi