]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: ko-release: make scripts bourne sh compliant [checkbashisms]
authorSami Kerola <kerolasa@iki.fi>
Sun, 18 Mar 2012 20:45:11 +0000 (21:45 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 30 Mar 2012 14:48:13 +0000 (16:48 +0200)
$ checkbashisms ko-release-gen
possible bashism in ko-release-gen line 31 ('function' is useless):
function die {
possible bashism in ko-release-gen line 36 ('function' is useless):
function add_file {
possible bashism in ko-release-gen line 68 ('function' is useless):
function add_html_dir {
possible bashism in ko-release-gen line 72 (brace expansion):
        for fl in $(ls $src/*.{html,css,png}); do

$ checkbashisms ko-release-push
possible bashism in ko-release-push line 29 ('function' is useless):
function die {
possible bashism in ko-release-push line 34 ('function' is useless):
function push_file {

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tools/ko-release-gen
tools/ko-release-push

index 58f05415d6c865e9866b28c28c34d80a2469b438..9c2b5b471ac891072ad3222c55eef105203b8536 100755 (executable)
@@ -29,12 +29,12 @@ DISTDIR=${1:-"kernel.org"}/v${VERSION_MAJOR}
 
 GPG_CMD="gpg --use-agent --armor --detach-sign --quiet"
 
-function die {
+die() {
        echo $1
        exit 1
 }
 
-function add_file {
+add_file() {
        local src="$1"
        local name=$(basename $1)
        local subdir=$DISTDIR/${2:-""}
@@ -66,11 +66,11 @@ function add_file {
        echo " OK "
 }
 
-function add_html_dir {
+add_html_dir() {
        local src="$1"          # source dir
        local tgt="$2"          # target dir
        
-       for fl in $(ls $src/*.{html,css,png}); do
+       for fl in $(ls $src/*.html $src/*.css $src/*.png); do
                add_file $fl $tgt
        done
 }
index f08954fc14c361211117617dce01451e5ff547c7..ef16fce978026e114ffa9037fee1e50dbb37f8d7 100755 (executable)
@@ -26,7 +26,7 @@ DISTDIR="${BASEDIR}/v${VERSION_MAJOR}"
 
 KO_DIR="/pub/linux/utils/util-linux/v${VERSION_MAJOR}"
 
-function die {
+die() {
        echo $1
        exit 1
 }