Created
January 30, 2018 22:22
-
-
Save mikecriggs/8c016fac303c69a4a59b8600c6b59ff2 to your computer and use it in GitHub Desktop.
Upload with sftp via bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# upload via sftp | |
# | |
# fill out the following definitions | |
DEVICE="$1" | |
ROM="" | |
USER="" | |
HOST="" | |
PASSWORD="" | |
# install sshpass | |
sudo apt install sshpass -y | |
# upload | |
export SSHPASS=$PASSWORD | |
sshpass -e sftp -oBatchMode=no -b - $USER@$HOST << ! | |
put out/target/product/$DEVICE/$ROM*.zip | |
bye | |
! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment