dist-vendor.sh (497B)
1 #!/bin/sh 2 # Since Meson invokes this script as 3 # "/bin/sh .../dist-vendor.sh DIST SOURCE_ROOT" we can't rely on bash features 4 set -eu 5 export DIST="$1" 6 export SOURCE_ROOT="$2" 7 8 cd "$SOURCE_ROOT" 9 mkdir "$DIST"/.cargo 10 cargo vendor > "$DIST/.cargo/config" 11 # Don't combine the previous and this line with a pipe because we can't catch 12 # errors with "set -o pipefail" 13 sed -i 's/^directory = ".*"/directory = "vendor"/g' "$DIST/.cargo/config" 14 # Move vendor into dist tarball directory 15 mv vendor "$DIST" 16