diff options
author | Jonas Smedegaard <dr@jones.dk> | 2011-03-15 13:39:58 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2011-03-15 13:39:58 +0100 |
commit | d3b2f6fcf263f0a460ab5e0083f0eac9742a0626 (patch) | |
tree | 503472f21ad48d92ab6c14098db231697eb32f5d | |
parent | be3ef2bc15658e792e7294324078290008743699 (diff) |
Fix bashisms: superfluous leading function keyword. Thanks to 'themill'.
-rwxr-xr-x | localcowbuilder-login | 2 | ||||
-rwxr-xr-x | localcowbuilder-update | 2 | ||||
-rwxr-xr-x | localcowdebuild | 2 | ||||
-rwxr-xr-x | localgitcowdebuild | 2 | ||||
-rwxr-xr-x | localgitdebuild | 2 | ||||
-rwxr-xr-x | localgitpdebuild | 2 | ||||
-rwxr-xr-x | localpbuilder-login | 2 | ||||
-rwxr-xr-x | localpbuilder-update | 2 | ||||
-rwxr-xr-x | localpdebuild | 2 | ||||
-rwxr-xr-x | localwebresolve | 14 | ||||
-rwxr-xr-x | xsh | 4 |
11 files changed, 18 insertions, 18 deletions
diff --git a/localcowbuilder-login b/localcowbuilder-login index f1cedb3..c3f9289 100755 --- a/localcowbuilder-login +++ b/localcowbuilder-login @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG POOL [cowbuilderopts] diff --git a/localcowbuilder-update b/localcowbuilder-update index 4a484f5..18507ea 100755 --- a/localcowbuilder-update +++ b/localcowbuilder-update @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG POOL diff --git a/localcowdebuild b/localcowdebuild index 5a2e0a3..c1eaab8 100755 --- a/localcowdebuild +++ b/localcowdebuild @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG POOL [debbuildopts] [-- pbuilderopts]" diff --git a/localgitcowdebuild b/localgitcowdebuild index 50ecf6b..f1eee51 100755 --- a/localgitcowdebuild +++ b/localgitcowdebuild @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG POOL [debbuildopts] [git-buildpackage opts] [-- pbuilderopts] diff --git a/localgitdebuild b/localgitdebuild index 51e0d7a..2718aa0 100755 --- a/localgitdebuild +++ b/localgitdebuild @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG [git-buildpackage opts] [-- debuild opts] diff --git a/localgitpdebuild b/localgitpdebuild index d8c3c93..613dc38 100755 --- a/localgitpdebuild +++ b/localgitpdebuild @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { echo <<EOF Usage: $PRG POOL [debbuildopts] [-- pbuilderopts] diff --git a/localpbuilder-login b/localpbuilder-login index b00e94e..7ef0499 100755 --- a/localpbuilder-login +++ b/localpbuilder-login @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG POOL [pbuilderopts] diff --git a/localpbuilder-update b/localpbuilder-update index d56ac28..f00b6e3 100755 --- a/localpbuilder-update +++ b/localpbuilder-update @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG POOL diff --git a/localpdebuild b/localpdebuild index e6365fc..5ad993a 100755 --- a/localpdebuild +++ b/localpdebuild @@ -24,7 +24,7 @@ set -e PRG=$(basename "$0") -function showhelp() { +showhelp() { cat <<EOF Usage: $PRG POOL [debbuildopts] [-- pbuilderopts] diff --git a/localwebresolve b/localwebresolve index a8252a9..ab11981 100755 --- a/localwebresolve +++ b/localwebresolve @@ -13,13 +13,13 @@ set -e -function usage() { +usage() { echo "Usage: $(basename $0) <YYYY.MM> [<website> [<website>...]]" echo " If no website is given, all are attempted" exit 1 } -function exit1() { +exit1() { echo "Error: $1" echo "Exiting..." exit 1 @@ -43,11 +43,11 @@ LOGROOT=/var/log/apache-vhosts WEBROOT=/var/www # Options: $1=LOGROOT, $2=WEBROOT, $3=WEBSITE, $4=YEARDOTMONTH -function resolveddir() { echo $1/$3; } -function webdirs() { find $1 -type d -mindepth 1 -maxdepth 1 | grep '\.*\.' | sed 's!$1!!'; } -#function logfiles() { $(ls -r $LOGDIR/*-access*.gz) $(ls -r $LOGDIR/access*.??.gz) $(ls -r $LOGDIR/access*.?.gz) $(ls -r $LOGDIR/access*.?); } -function logcontent() { for file in $(find $1/$3 -name "$YEARDOTMONTH.??.gz" ! -name '*00.gz' -type f -mindepth 1 -maxdepth 1 -follow | sort); do zcat $file; done; for file in $(find $1/$3 -name "$YEARDOTMONTH.??" ! -name '*00' -type f -mindepth 1 -maxdepth 1 -follow | sort); do cat $file; done; } -function logremove() { for file in $(find $1/$3 -name "$YEARDOTMONTH.??.gz" ! -name '*00.gz' -type f -mindepth 1 -maxdepth 1 -follow | sort); do rm -f $file; done; for file in $(find $1/$3 -name "$YEARDOTMONTH.??" ! -name '*00' -type f -mindepth 1 -maxdepth 1 -follow | sort); do rm -f $file; done; } +resolveddir() { echo $1/$3; } +webdirs() { find $1 -type d -mindepth 1 -maxdepth 1 | grep '\.*\.' | sed 's!$1!!'; } +#logfiles() { $(ls -r $LOGDIR/*-access*.gz) $(ls -r $LOGDIR/access*.??.gz) $(ls -r $LOGDIR/access*.?.gz) $(ls -r $LOGDIR/access*.?); } +logcontent() { for file in $(find $1/$3 -name "$YEARDOTMONTH.??.gz" ! -name '*00.gz' -type f -mindepth 1 -maxdepth 1 -follow | sort); do zcat $file; done; for file in $(find $1/$3 -name "$YEARDOTMONTH.??" ! -name '*00' -type f -mindepth 1 -maxdepth 1 -follow | sort); do cat $file; done; } +logremove() { for file in $(find $1/$3 -name "$YEARDOTMONTH.??.gz" ! -name '*00.gz' -type f -mindepth 1 -maxdepth 1 -follow | sort); do rm -f $file; done; for file in $(find $1/$3 -name "$YEARDOTMONTH.??" ! -name '*00' -type f -mindepth 1 -maxdepth 1 -follow | sort); do rm -f $file; done; } # The above can be overridden LOCALCONFIG=/etc/local/webresolve.conf @@ -2,11 +2,11 @@ SCRIPT=$(basename $0) -function usage () { +usage() { echo "Usage: $SCRIPT [--x] [--verbose] [[--su |{user}@]{host}] [--] [remote command...]" } -function termwrapper () { +termwrapper() { PRG=$@ titletext="$title $titleopt" if [ "$V" = 1 ]; then |