entrypoint.sh 648 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. cd "$HOME"/rustdesk || exit 1
  3. # shellcheck source=/dev/null
  4. . "$HOME"/.cargo/env
  5. argv=$*
  6. while test $# -gt 0; do
  7. case "$1" in
  8. --release)
  9. mkdir -p target/release
  10. test -f target/release/libsciter-gtk.so || cp "$HOME"/libsciter-gtk.so target/release/
  11. release=1
  12. shift
  13. ;;
  14. --target)
  15. shift
  16. if test $# -gt 0; then
  17. rustup target add "$1"
  18. shift
  19. fi
  20. ;;
  21. *)
  22. shift
  23. ;;
  24. esac
  25. done
  26. if [ -z $release ]; then
  27. mkdir -p target/debug
  28. test -f target/debug/libsciter-gtk.so || cp "$HOME"/libsciter-gtk.so target/debug/
  29. fi
  30. set -f
  31. #shellcheck disable=2086
  32. VCPKG_ROOT=/vcpkg cargo build $argv