SHELL_DIR=$(dirname $0) echo "change dir to $SHELL_DIR" cd "$SHELL_DIR" # Set remote server details (modify as needed) REMOTE_USER="root" REMOTE_HOST="132.232.113.98" VERSION="$1" PLATFORM="$2" REMOTE_PATH="/var/www/html/nld/$PLATFORM/$VERSION/" APP_NAME="MyUnityApp.ipa" ssh "$REMOTE_USER@$REMOTE_HOST" "mkdir -p $REMOTE_PATH" scp nld_self_host_ipa.plist "$REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH" cd "../../Builds/$PLATFORM/$VERSION/" scp "${APP_NAME}" "$REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH" upload_result=$? if [ $upload_result -eq 0 ]; then echo "ipa uploaded to remote server successfully." else echo "Failed to upload ipa to remote server." fi