xref: /btstack/port/arduino/upload_latest_sftp.sh (revision 1b464e99afd70ddaf6b75be1ba7cc563a5f5dfd8)
1#!/bin/bash
2USAGE="Usage: upload_latest_sftp.sh host path user"
3
4# command line checks, bash
5if [ $# -ne 3 ]; then
6        echo ${USAGE}
7        exit 0
8fi
9host=$1
10path=$2
11user=$3
12
13echo Uploading generated archive to ${host}/${path} with user ${user}
14
15# SFTP is very peculiar: recursive put only works for a single directory
16sftp ${user}@${host} << EOF
17  put btstack-arduino-latest.zip ${path}
18  quit
19EOF
20