From a499e2d63e3f11e0cffd85e8477f1ad2440b50ac Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Sun, 9 Jul 2017 04:43:14 +0300 Subject: [PATCH] Add script for uploading to u.wut.ee --- PKGBUILD | 9 ++++++--- uwut-upload | 13 +++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 uwut-upload diff --git a/PKGBUILD b/PKGBUILD index ef4d522..fcd0b70 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Author: Arti Zirk pkgname=ilves-upload -pkgver=0.0.1 +pkgver=0.0.2 pkgrel=1 pkgdesc='Helper scripts to upload files to ilves' url='https://git.wut.ee/PKGBUILD/ilves-upload' @@ -8,11 +8,14 @@ arch=('any') makedepends=() depends=() license=('mit') -source=('ilves-upload') -md5sums=('bfedce65b675ffa9883642e092456c8c') +source=('ilves-upload' + 'uwut-upload') +md5sums=('bfedce65b675ffa9883642e092456c8c' + 'ad1f1b12cf4ef3e2d036c9cedd37b2e7') package() { cd "$srcdir" install -d $pkgdir/usr/bin install -Dm755 ilves-upload $pkgdir/usr/bin/ilves-upload + install -Dm755 uwut-upload $pkgdir/usr/bin/uwut-upload } diff --git a/uwut-upload b/uwut-upload new file mode 100644 index 0000000..a6fce2b --- /dev/null +++ b/uwut-upload @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +SERVER="http" +REMOTE_PATH="/srv/http/u.wut.ee" +FILE="$1" + +if [[ -z "$FILE" || ! -e "$FILE" ]]; then + echo "Usage: $0 " + exit 1 +fi + +scp "$FILE" $SERVER:$REMOTE_PATH