File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22# 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)
35
46# Fail immediately in case of errors and/or unset variables
57set -eu -o pipefail
68
7- cargo license -h & > /dev/null || cargo install cargo-license
9+ cargo- license -h & > /dev/null || cargo install cargo-license
810
9- # Going to exonum-java-binding- core/rust directory.
11+ # Going to exonum-java-binding/ core/rust directory.
1012backup_dir=${PWD}
1113script_dir=$( dirname $( realpath -s " $0 " ) ) # Directory of this script. Must be exonum-java-binding/core/rust
1214cd ${script_dir}
1315
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"
1817
19- # Returning to the root EJB directory.
18+ # Restoring initial directory.
2019cd ${backup_dir}
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ source ./tests_profile
102102# Prepare directories
103103PACKAGING_BASE_DIR=" ${EJB_RUST_DIR} /target/${BUILD_MODE} "
104104PACKAGING_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"
106106mkdir -p " ${PACKAGING_BASE_DIR} "
107107mkdir -p " ${PACKAGING_NATIVE_LIB_DIR} "
108108mkdir -p " ${PACKAGING_ETC_DIR} "
You can’t perform that action at this time.
0 commit comments