Ship native programs

This commit is contained in:
Michael Vines
2018-10-09 15:54:15 -07:00
parent 5f8cbf359e
commit 5c523716aa
4 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,29 @@
#!/bin/bash -e
#
# Installs native programs as |cargo install| doesn't know about them
#
here=$(dirname "$0")
SOLANA_ROOT="$(cd "$here"/..; pwd)"
installDir=$1
variant=${2:-release}
if [[ -z $installDir ]]; then
echo Install directory not specified
exit 1
fi
if [[ ! -d $installDir ]]; then
echo "Not a directory: $installDir"
exit 1
fi
for dir in "$SOLANA_ROOT"/programs/native/*; do
for program in "$SOLANA_ROOT/target/$variant/deps/lib$(basename "$dir")".{so,dylib,dll}; do
if [[ -f $program ]]; then
cp -v "$program" "$installDir"
fi
done
done