diff options
author | Trevor Johns <trevor@tjohns.net> | 2007-12-29 08:17:29 +0000 |
---|---|---|
committer | Trevor Johns <trevor@tjohns.net> | 2007-12-29 08:17:29 +0000 |
commit | 186d29d923ba41a90c063832d64c7ddbe057592d (patch) | |
tree | 8981ec87e53e0d32555c758fd474f66289233719 /admin | |
parent | 9a78338b6bec9447d07c482c2535d495fd01d1a8 (diff) | |
download | php-openid-186d29d923ba41a90c063832d64c7ddbe057592d.zip php-openid-186d29d923ba41a90c063832d64c7ddbe057592d.tar.gz php-openid-186d29d923ba41a90c063832d64c7ddbe057592d.tar.bz2 |
[project @ Update admin scripts to run under Mac OS X]
The scripts in admin use several non-POSIX arguments which do not work on Mac
OS X. See my original post to dev@openidenabled.com:
message://%3C5902A542-C723-4F0A-8478-1F33C874D1B8@tjohns.net%3E
http://lists.openidenabled.com/pipermail/dev/2007-December/000979.html
This patch makes the following changes to fix this:
- Changed $HERE in admin/runtests to avoid calling readlink.
- Calls to xargs now use '-L 1' instead of '-l1'.
- Calls to 'wc -L' were eliminated.
Diffstat (limited to 'admin')
-rw-r--r-- | admin/docblocks | 2 | ||||
-rw-r--r-- | admin/nobadbraces | 2 | ||||
-rw-r--r-- | admin/nolonglines | 4 | ||||
-rw-r--r-- | admin/open_tag | 2 | ||||
-rw-r--r-- | admin/runtests | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/admin/docblocks b/admin/docblocks index 6764ff1..a7f05c3 100644 --- a/admin/docblocks +++ b/admin/docblocks @@ -1,7 +1,7 @@ #!/usr/bin/env bash #set -e -bad_files=$(./admin/findphp | xargs -l1 /usr/bin/env perl admin/docblocks.pl) +bad_files=$(./admin/findphp | xargs -L 1 /usr/bin/env perl admin/docblocks.pl) if [ "$bad_files" ] then diff --git a/admin/nobadbraces b/admin/nobadbraces index 90769d3..ee060dc 100644 --- a/admin/nobadbraces +++ b/admin/nobadbraces @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -./admin/findphp | xargs -l1 /usr/bin/env perl admin/brace_style.pl +./admin/findphp | xargs -L 1 /usr/bin/env perl admin/brace_style.pl diff --git a/admin/nolonglines b/admin/nolonglines index 48d1c7d..3e2addc 100644 --- a/admin/nolonglines +++ b/admin/nolonglines @@ -1,9 +1,7 @@ #!/usr/bin/env bash files_with_long_lines=$(./admin/findphp | - xargs -l1 wc -L | - awk '$1 > 80 { print $2 }' | - xargs -l1 --replace=FILENAME /usr/bin/env perl admin/longlines.pl FILENAME 80) + xargs -L 1 -I FILENAME /usr/bin/env perl admin/longlines.pl FILENAME 80) if [ "$files_with_long_lines" ] then diff --git a/admin/open_tag b/admin/open_tag index c9f4644..27fe1c5 100644 --- a/admin/open_tag +++ b/admin/open_tag @@ -1,7 +1,7 @@ #!/usr/bin/env bash bad_files=$(./admin/findphp | - xargs -l1 grep -H -m 1 "<?php" -c | + xargs -L 1 grep -H -m 1 "<?php" -c | grep ":0" | awk -F: '{ print $1 }') diff --git a/admin/runtests b/admin/runtests index 770c5fb..6629235 100644 --- a/admin/runtests +++ b/admin/runtests @@ -1,6 +1,8 @@ #!/usr/bin/env bash -HERE=$(readlink --canonicalize $(dirname "$0")) +# Get the absolute path containing this script +cd $(dirname "$0") +HERE=$PWD test_import () { ./admin/checkimports |