From dce177d9f929c18d5eb2b5164b18f92c701a0052 Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Wed, 21 Dec 2011 01:14:32 -0600 Subject: Some usage messages added --- toru | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'toru') diff --git a/toru b/toru index d622510..b71fb8c 100755 --- a/toru +++ b/toru @@ -15,9 +15,17 @@ source /etc/abs.conf source /etc/libretools.conf +# TODO: clean usage instructions +function usage { + echo "$0 [options] repo1 ... repon" + echo + echo "-h : this message" + exit 1 +} + if [ ! -w "$TORUPATH" ]; then error "Toru's path isn't writable. Please check $TORUPATH" - exit 1 + exit 1 fi # TODO move to common functions @@ -115,7 +123,7 @@ split_pkgname_from_pkgver() { sed "s/^\(.\+\)-\([^-]\+-[^-]\+\)$/\1 \2/" $1 } -# Get the fullpkgver +# Get the fullpkgver # pkgname from pkgver separator can be either '-' or ' ' extract_fullpkgver() { echo "$@" | tr " " "\n" | sed "s/^.\+[ -]\([^-]\+-[^-]\+\)$/\1/" -- cgit v1.2.3-54-g00ecf