diff mbox series

[OpenWrt-Devel,1/2] scripts/strip-kmod.sh: Replace legacy `` with $()

Message ID 20191231021804.47805-1-rosenp@gmail.com
State Accepted
Headers show
Series [OpenWrt-Devel,1/2] scripts/strip-kmod.sh: Replace legacy `` with $() | expand

Commit Message

Rosen Penev Dec. 31, 2019, 2:18 a.m. UTC
Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 scripts/strip-kmod.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Adrian Schmutzler Dec. 31, 2019, 10:36 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Rosen Penev
> Sent: Dienstag, 31. Dezember 2019 03:18
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH 1/2] scripts/strip-kmod.sh: Replace legacy
> `` with $()

Thanks for taking care of those issues.

Some comments for future submissions:
- Based on the submitting-patches rules the first word after the prefix in commit title has to be lower case (for this patch "Replace" -> "replace")
- If you change something in a target folder, the first prefix should be the name of the target ("mvebu:", "ramips:", etc.; not applicable to this patch). Maybe have a quick look at the relevant section of submitting-patches; I changed that manually when applying your last set of patches
- Even with simple changes like this one, it would be nice to have a one-sentence description _why_ they are needed.
- Finally, personally, I tend to prevent having special characters in the commit title. Thus, I would prefer using the word "backticks" instead of putting "``" directly into the commit title.

Best

Adrian
diff mbox series

Patch

diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh
index 313015b909..7886cd907f 100755
--- a/scripts/strip-kmod.sh
+++ b/scripts/strip-kmod.sh
@@ -50,6 +50,6 @@  $3 && $2 ~ /[brtd]/ && $3 !~ /\$LC/ && !def[$3] {
 }
 ' > "$MODULE.tmp1"
 
-${CROSS}objcopy `cat ${MODULE}.tmp1` ${MODULE}.tmp ${MODULE}.out
+${CROSS}objcopy $(cat ${MODULE}.tmp1) ${MODULE}.tmp ${MODULE}.out
 mv "${MODULE}.out" "${MODULE}"
 rm -f "${MODULE}".t*