Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/src/cargo-meson.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / src / cargo-meson.sh` 44 lines ยท 868 bytes Raw Blame History 1 #!/bin/sh 2 3 if test "$#" -lt 2 4 then 5 exit 1 6 fi 7 8 SOURCE_DIR="$1" 9 BUILD_DIR="$2" 10 BUILD_TYPE=debug 11 12 shift 2 13 14 for arg 15 do 16 case "$arg" in 17 --release) 18 BUILD_TYPE=release;; 19 esac 20 done 21 22 case "$(cargo -vV | sed -n 's/^host: \(.*\)$/\1/p')" in 23 *-windows-msvc) 24 LIBNAME=gitcore.lib 25 PATH="$(echo "$PATH" | tr ':' '\n' | grep -Ev "^(/mingw64/bin|/usr/bin)$" | paste -sd: -):/mingw64/bin:/usr/bin" 26 export PATH 27 ;; 28 *-windows-*) 29 LIBNAME=gitcore.lib;; 30 *) 31 LIBNAME=libgitcore.a;; 32 esac 33 34 cargo build --lib --quiet --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" 35 RET=$? 36 if test $RET -ne 0 37 then 38 exit $RET 39 fi 40 41 if ! cmp "$BUILD_DIR/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" >/dev/null 2>&1 42 then 43 cp "$BUILD_DIR/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" 44 fi