diff options
| author | Linus Färnstrand <faern@faern.net> | 2021-12-30 16:10:01 +0100 |
|---|---|---|
| committer | Linus Färnstrand <faern@faern.net> | 2021-12-30 16:10:01 +0100 |
| commit | 69a521173f0ab355538c0abe2ea42a7a4e00229b (patch) | |
| tree | 71f7b0e9e563f879c3622691dcf4a2202c4e098d | |
| parent | 3c5e056ee9d7e55578917055544e72e36d9f6c72 (diff) | |
| download | mullvadvpn-69a521173f0ab355538c0abe2ea42a7a4e00229b.tar.xz mullvadvpn-69a521173f0ab355538c0abe2ea42a7a4e00229b.zip | |
Better names for src/dst when copying binaries
| -rwxr-xr-x | build.sh | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -254,6 +254,7 @@ function build { # Move binaries to correct locations in dist-assets ################################################################################ + # All the binaries produced by cargo that we want to include in the app if [[ ("$(uname -s)" == "Darwin") ]]; then BINARIES=( mullvad-daemon @@ -282,30 +283,30 @@ function build { fi if [[ -n $current_target ]]; then - local src_dir="$CARGO_TARGET_DIR/$current_target/$RUST_BUILD_MODE" + local cargo_output_dir="$CARGO_TARGET_DIR/$current_target/$RUST_BUILD_MODE" # To make it easier to package universal builds on macOS the binaries are located in a # directory with the name of the target triple. - local dst_dir="dist-assets/$current_target" - mkdir -p "$dst_dir" + local destination_dir="dist-assets/$current_target" + mkdir -p "$destination_dir" else - local src_dir="$CARGO_TARGET_DIR/$RUST_BUILD_MODE" - local dst_dir="dist-assets" + local cargo_output_dir="$CARGO_TARGET_DIR/$RUST_BUILD_MODE" + local destination_dir="dist-assets" fi for binary in ${BINARIES[*]}; do - local src="$src_dir/$binary" - local dst="$dst_dir/$binary" + local source="$cargo_output_dir/$binary" + local destination="$destination_dir/$binary" if [[ "$(uname -s)" == "MINGW"* || "$binary" == *.dylib ]]; then - log_info "Copying $src => $dst" - cp "$src" "$dst" + log_info "Copying $source => $destination" + cp "$source" "$destination" else - log_info "Stripping $src => $dst" - strip "$src" -o "$dst" + log_info "Stripping $source => $destination" + strip "$source" -o "$destination" fi if [[ "$SIGN" == "true" && "$(uname -s)" == "MINGW"* ]]; then - sign_win "$dst" + sign_win "$destination" fi done } |
