From: Han Boetes <han@mijncomputer.nl>
To: linux-kernel@vger.kernel.org
Cc: Martin Schlemmer <azarah@nosferatu.za.org>
Subject: patch to fix bashism
Date: Fri, 8 Apr 2005 23:11:38 +0159 [thread overview]
Message-ID: <20050408211200.GX15412@boetes.org> (raw)
Hi,
This patch fixes a three bashisms in
scripts/gen_initramfs_list.sh;
I'm not sure of the intention of the second change (local
name=...). So it's very well possible that:
+ local name="${location%/$srcdir}"
is more appropriate.
--- scripts/gen_initramfs_list.sh.orig 2005-03-27 14:53:15.628883408 +0200
+++ scripts/gen_initramfs_list.sh 2005-03-27 15:12:20.093898280 +0200
@@ -1,4 +1,7 @@
-#!/bin/bash
+#!/bin/sh
+
+# script is sourced, the shebang is ignored.
+
# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
# Released under the terms of the GNU GPL
#
@@ -56,9 +59,9 @@
parse() {
local location="$1"
- local name="${location/${srcdir}//}"
+ local name="${location#$srcdir/}"
# change '//' into '/'
- name="${name//\/\///}"
+ name=`echo $name|sed -e 's|//|/|g'`
local mode="$2"
local uid="$3"
local gid="$4"
@@ -68,8 +71,8 @@
[ "$gid" -eq "$root_gid" ] && gid=0
local str="${mode} ${uid} ${gid}"
- [ "${ftype}" == "invalid" ] && return 0
- [ "${location}" == "${srcdir}" ] && return 0
+ [ "${ftype}" = "invalid" ] && return 0
+ [ "${location}" = "${srcdir}" ] && return 0
case "${ftype}" in
"file")
# Han
next reply other threads:[~2005-04-08 21:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-08 21:12 Han Boetes [this message]
2005-04-09 20:18 ` David Weinehall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050408211200.GX15412@boetes.org \
--to=han@mijncomputer.nl \
--cc=azarah@nosferatu.za.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®