|
9 | 9 |
|
10 | 10 | ---- |
11 | 11 |
|
| 12 | +``-dir, --additional_directories`` Options |
| 13 | +---------------------------------- |
| 14 | + |
| 15 | + .. admonition:: Dependency |
| 16 | + |
| 17 | + The option ``-dir, --additional_directories`` is a sub-option of and requires the option |
| 18 | + ``--license``. |
| 19 | + |
| 20 | + The ``-dir, --additional_directories`` option allows the user to include additional directories |
| 21 | + of licenses to use in license detection. |
| 22 | + |
| 23 | + This command only needs to be run once for each set of additional directories; in all subsequent |
| 24 | + runs of Scancode with the same directories all the licenses in the directories will be cached. |
| 25 | + |
| 26 | + The directory structure should look something like this:: |
| 27 | + |
| 28 | + licenses/ |
| 29 | + ├── privateLicense1/ |
| 30 | + │ ├── license/ |
| 31 | + │ │ ├── privateLicense1.LICENSE |
| 32 | + │ │ └── privateLicense1.yml |
| 33 | + │ └── rule/ |
| 34 | + │ ├── privateLicense1.RULE |
| 35 | + │ └── privateLicense1.yml |
| 36 | + └── privateLicense2/ |
| 37 | + ├── license/ |
| 38 | + │ ├── privateLicense2.LICENSE |
| 39 | + │ └── privateLicense2.yml |
| 40 | + └── rule/ |
| 41 | + ├── privateLicense2.RULE |
| 42 | + └── privateLicense2.yml |
| 43 | + |
| 44 | + A scan example using the ``-dir, --additional_directories PATH`` option with a single directory:: |
| 45 | + |
| 46 | + scancode -clpieu --json-pp output.json samples -dir /home/user/external_licenses/license1 |
| 47 | + |
| 48 | + You can also include multiple directories like so:: |
| 49 | + |
| 50 | + scancode -clpieu --json-pp output.json samples -dir /home/user/external_licenses/external1 -dir /home/user/external_licenses/external2 |
| 51 | + |
| 52 | + If you want to continue running scans with ``/home/user/external_licenses/external1`` and ``/home/user/external_licenses/external2``, |
| 53 | + you can omit the ``-dir`` option in subsequent scans and they will still be included. :: |
| 54 | + |
| 55 | + scancode -clpieu --json-pp output.json samples |
| 56 | + |
| 57 | + However, if you wanted to run a scan with a new set of directories, such as ``home/user/external_licenses/external1`` |
| 58 | + and ``home/user/external_licenses/external3``, you would need to rerun the scan with those directories as parameters. :: |
| 59 | + |
| 60 | + scancode -clpieu --json-pp output.json samples -dir /home/user/external_licenses/external1 -dir /home/user/external_licenses/external3 |
| 61 | + |
| 62 | + |
| 63 | + .. |
| 64 | +
|
| 65 | +---- |
| 66 | + |
12 | 67 | ``--generated`` Options |
13 | 68 | ----------------------- |
14 | 69 |
|
|
0 commit comments