123456789101112131415161718192021222324252627282930 |
- #!/usr/bin/env bash
- #
- #
- #
- #REMOTE_HOST="vm-fedora33"
- # Manual
- #BUILD_DIR="$PWD"
- #REMOTE_COMMAND="cd $PWD && ./script.sh"
- # VSCode
- #REMOTE_HOST="vm-fedora33"
- #BUILD_DIR=${fileWorkspaceFolder}
- #REMOTE_CMD="cd ${fileWorkspaceFolder} && chmod +x ${file} && ${file}"
- # Copy local directory "$2" to remote host "$1" and run the remaining commands
- ssh "$1" mkdir -p "$2"
- # Maybe use --delete for a cleaner dev env
- rsync -a "$2/" "$1":"$2"
- # We want this to expand on the client so we can pass our arguments to the remote
- # shellcheck disable=SC2029
- ssh "$1" "${@:2}"
- # exec_remote "$REMOTE_HOST" "$BUILD_DIR" "$REMOTE_CMD"
- #exec_remote vm-fedora33 ${fileWorkspaceFolder} cd ${fileWorkspaceFolder} && chmod +x ${file} && ${file}
|