2021-06-20 23:27:57 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-10-01 05:25:56 +08:00
|
|
|
cd "$HOME"/rustdesk || exit 1
|
|
|
|
# shellcheck source=/dev/null
|
|
|
|
. "$HOME"/.cargo/env
|
2021-06-20 23:27:57 +08:00
|
|
|
|
2022-10-01 05:25:56 +08:00
|
|
|
argv=$*
|
2021-06-20 23:27:57 +08:00
|
|
|
|
|
|
|
while test $# -gt 0; do
|
|
|
|
case "$1" in
|
2022-10-01 05:25:56 +08:00
|
|
|
--release)
|
|
|
|
mkdir -p target/release
|
|
|
|
test -f target/release/libsciter-gtk.so || cp "$HOME"/libsciter-gtk.so target/release/
|
|
|
|
release=1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--target)
|
|
|
|
shift
|
|
|
|
if test $# -gt 0; then
|
|
|
|
rustup target add "$1"
|
2021-06-20 23:27:57 +08:00
|
|
|
shift
|
2022-10-01 05:25:56 +08:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
shift
|
|
|
|
;;
|
2021-06-20 23:27:57 +08:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -z $release ]; then
|
|
|
|
mkdir -p target/debug
|
2022-10-01 05:25:56 +08:00
|
|
|
test -f target/debug/libsciter-gtk.so || cp "$HOME"/libsciter-gtk.so target/debug/
|
2021-06-20 23:27:57 +08:00
|
|
|
fi
|
2022-10-01 05:25:56 +08:00
|
|
|
set -f
|
|
|
|
#shellcheck disable=2086
|
2021-06-20 23:27:57 +08:00
|
|
|
VCPKG_ROOT=/vcpkg cargo build $argv
|