File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# Gather licenses for every Rust dependency and print it in the file in a readable form.
3
+ # Resulting file destination is either specified by `PACKAGING_ETC_DIR` variable, or
4
+ # is the script directory (exonum-java-binding/core/rust)
3
5
4
6
# Fail immediately in case of errors and/or unset variables
5
7
set -eu -o pipefail
6
8
7
- cargo license -h & > /dev/null || cargo install cargo-license
9
+ cargo- license -h & > /dev/null || cargo install cargo-license
8
10
9
- # Going to exonum-java-binding- core/rust directory.
11
+ # Going to exonum-java-binding/ core/rust directory.
10
12
backup_dir=${PWD}
11
13
script_dir=$( dirname $( realpath -s " $0 " ) ) # Directory of this script. Must be exonum-java-binding/core/rust
12
14
cd ${script_dir}
13
15
14
- cargo license -da \
15
- | sed ' s@registry+https://github.com/rust-lang/crates.io-index, @@g' ` # Remove unnecessary information from the list` \
16
- | sed ' s/\x1b\[[0-9;]*m//g' ` # Remove color escape sequences from the list` \
17
- > " ${PACKAGING_ETC_DIR:- .} /LICENSES-THIRD-PARTY-NATIVE"
16
+ cargo-license --json > " ${PACKAGING_ETC_DIR:- .} /LICENSES-THIRD-PARTY-NATIVE"
18
17
19
- # Returning to the root EJB directory.
18
+ # Restoring initial directory.
20
19
cd ${backup_dir}
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ source ./tests_profile
102
102
# Prepare directories
103
103
PACKAGING_BASE_DIR=" ${EJB_RUST_DIR} /target/${BUILD_MODE} "
104
104
PACKAGING_NATIVE_LIB_DIR=" ${PACKAGING_BASE_DIR} /lib/native"
105
- PACKAGING_ETC_DIR=" ${PACKAGING_BASE_DIR} /etc"
105
+ export PACKAGING_ETC_DIR=" ${PACKAGING_BASE_DIR} /etc"
106
106
mkdir -p " ${PACKAGING_BASE_DIR} "
107
107
mkdir -p " ${PACKAGING_NATIVE_LIB_DIR} "
108
108
mkdir -p " ${PACKAGING_ETC_DIR} "
You can’t perform that action at this time.
0 commit comments