From 5bb70212a669aaaced79819a3600f6668135ec10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Thu, 23 Sep 2010 11:03:42 -0300 Subject: Added help and error messages --- librerelease | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/librerelease b/librerelease index 5b5c575..920b734 100755 --- a/librerelease +++ b/librerelease @@ -1,18 +1,48 @@ #!/bin/bash -host=parabola +# Librerelease +# Uploads packages into free/ repo + +# Config +# SSH host, it's better if you have it configured on ~/.ssh/config +# with ControlMaster auto (and a shell opened somewhere else) +# +# Example: +# Host * +# Protocol 2 +# ControlMaster auto +# ControlPath /tmp/ssh-%r@%h:%p +# +# Host parabola +# Port 22 +# HostName parabolagnulinux.org +# User parabolavnx +# IdentityFile ~/.ssh/id_rsa +# +# $ cd pkgbuild/dir +# $ ssh parabola -fN +# $ librerelease extra + +host=parabola dir=parabolagnulinux.org/repo/free batchfile=/tmp/librerelease_batchfile.$$ +# End Config repo=${1} -if [ ${#repo} -eq 0 ]; then exit 1; fi +if [ ${#repo} -eq 0 ]; then + echo "Usage: $0 " + exit 1; +fi function to_sftp() { echo "$@" >> $batchfile } -if [ ! -e ./PKGBUILD ]; then exit 1; fi +if [ ! -e ./PKGBUILD ]; then + echo "PKGBUILD not found" + exit 1; +fi source PKGBUILD source /etc/makepkg.conf -- cgit v1.2.2