You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
552 B

#!/bin/bash
# uploadserver is set in /etc/hosts
#
# env vars:
# - ELECBUILD_UPLOADFROM
# - SSHUSER
set -e
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/.."
if [ -z "$SSHUSER" ]; then
SSHUSER=thomasv
fi
cd "$PROJECT_ROOT"
version=`git describe --tags --abbrev=0`
echo $version
if [ -z "$ELECBUILD_UPLOADFROM" ]; then
cd "$PROJECT_ROOT/../dist"
else
cd "$ELECBUILD_UPLOADFROM"
fi
sftp -oBatchMode=no -b - "$SSHUSER@uploadserver" << !
cd electrum-downloads-airlock
mkdir --parents "$version"
cd "$version"
mput *
bye
!