1
0

contrib: rename some shell scripts to have ".sh" extension

The extension gives formatting hints to some editors. (especially if they support .editorconfig)
This commit is contained in:
SomberNight
2022-09-27 13:34:03 +00:00
parent f174b9164c
commit 1cecd2c6e8
11 changed files with 15 additions and 15 deletions

38
contrib/upload.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/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
# do not fail sftp if directory exists
# see https://stackoverflow.com/questions/51437924/bash-shell-sftp-check-if-directory-exists-before-creating
sftp -oBatchMode=no -b - "$SSHUSER@uploadserver" << !
cd electrum-downloads-airlock
-mkdir "$version"
-chmod 777 "$version"
cd "$version"
mput *
bye
!