try to automate upload of btstack-arduino-latest.zip

This commit is contained in:
Matthias Ringwald 2015-06-03 23:46:50 +02:00
parent bed744a565
commit 5bf84c0b9d
2 changed files with 20 additions and 0 deletions

View File

@ -42,3 +42,4 @@ release: update_version
cp -r ${PATHS} ${BTSTACK_PACKAGE}
rm -f ${ARCHIVE}
zip -r ${ARCHIVE} btstack
cp ${ARCHIVE} btstack-arduino-latest.zip

View File

@ -0,0 +1,19 @@
#!/bin/bash
USAGE="Usage: upload_latest_sftp.sh host path user"
# command line checks, bash
if [ $# -ne 3 ]; then
echo ${USAGE}
exit 0
fi
host=$1
path=$2
user=$3
echo Uploading generated archive to ${host}/${path} with user ${user}
# SFTP is very peculiar: recursive put only works for a single directory
sftp ${user}@${host} << EOF
put btstack-arduino-latest.zip ${path}
quit
EOF