2
0
Fork 0

Add script for uploading to u.wut.ee

This commit is contained in:
Arti Zirk 2017-07-09 04:43:14 +03:00
parent 3a98daa797
commit a499e2d63e
2 changed files with 19 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# Author: Arti Zirk <arti.zirk@gmail.com>
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
}

13
uwut-upload Normal file
View File

@ -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 <FILE>"
exit 1
fi
scp "$FILE" $SERVER:$REMOTE_PATH