This commit is contained in:
Arti Zirk 2017-07-09 04:35:24 +03:00
commit d6ab75d8f4
3 changed files with 35 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
src/
pkg/
*pkg.tar.xz

18
PKGBUILD Normal file
View File

@ -0,0 +1,18 @@
# Author: Arti Zirk <arti.zirk@gmail.com>
pkgname=ilves-upload
pkgver=0.0.1
pkgrel=1
pkgdesc='Helper scripts to upload files to ilves'
url='https://git.wut.ee/PKGBUILD/ilves-upload'
arch=('any')
makedepends=()
depends=()
license=('mit')
source=('ilves-upload')
md5sums=('bfedce65b675ffa9883642e092456c8c')
package() {
cd "$srcdir"
install -d $pkgdir/usr/bin
install -Dm755 ilves-upload $pkgdir/usr/bin/ilves-upload
}

14
ilves-upload Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
SERVER="http"
REMOTE_PATH="/srv/http/repo.wut.ee/ilves"
PKG="$1"
if [[ -z "$PKG" || ! -e "$PKG" ]]; then
echo "Usage: $0 <package.pkg.tar.xz>"
exit 1
fi
scp "$PKG" $SERVER:$REMOTE_PATH
ssh $SERVER repo-add $REMOTE_PATH/ilves.db.tar.xz $REMOTE_PATH/$(basename $PKG)