From cf1f8cc4307b7b183e8db88fe348434961b207af Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 27 Oct 2006 12:34:26 +0000 Subject: Fix bashism (avoid declaring functions as such). Extend copyright year. --- showlog | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'showlog') diff --git a/showlog b/showlog index b0b0f87..4ae3861 100755 --- a/showlog +++ b/showlog @@ -1,9 +1,9 @@ -#!/bin/bash +#!/bin/sh # # /usr/local/sbin/showlog -# Copyright 2002 Jonas Smedegaard +# Copyright 2002-2006 Jonas Smedegaard # -# $Id: showlog,v 1.7 2006-10-27 12:27:15 jonas Exp $ +# $Id: showlog,v 1.8 2006-10-27 12:34:26 jonas Exp $ # # Show topic-specific log entries # @@ -11,18 +11,18 @@ # halt on errors (NB! this is a bashism...) set -e -function usage() { +usage() { echo "Usage: $(basename $0) ftp|web|weberror|websuexec|mail|system [ [...]]" exit 1 } -function exit1() { +exit1() { echo "Error: $1" echo "Exiting..." exit 1 } -function cat_logs() { +cat_logs() { rootdir=$1 shift patterns=$@ @@ -94,7 +94,7 @@ case "$target" in ;; esac -if [ $# \> 0 ]; then +if [ $# -gt 0 ]; then grep_opts="" for keyword in $@; do grep_opts="$opts -e $keyword" -- cgit v1.2.3