Re: [LEDE-DEV] [patch master 14/15] Expressions don't expand in single quotes, use double quotes for that

2016-10-02 Thread Jan-Tarek Butt
Hi Lars,

> 
> I think, this is just a change based on style preferences, or?
> Using single quotes specifically for situation where expansion is not intended
> feels quite explicite and clear to me - thus personally I would prefer to 
> stick
> with single quotes instead of double quotes combined with escaping.
> Or did I miss the point of your change?
> 

Yes, this is just a question of style. OK, than we can ignore that patch

cheers
Tarek



signature.asc
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [patch master 14/15] Expressions don't expand in single quotes, use double quotes for that

2016-10-01 Thread Oswald Buddenhagen
On Sat, Oct 01, 2016 at 12:49:23AM +0200, Lars Kruse wrote:
> I think, this is just a change based on style preferences, or?
> Using single quotes specifically for situation where expansion is not intended
> feels quite explicite and clear to me - thus personally I would prefer to 
> stick
> with single quotes instead of double quotes combined with escaping.
>
+1

> Or did I miss the point of your change?
> 
> Cheers,
> Lars
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [patch master 14/15] Expressions don't expand in single quotes, use double quotes for that

2016-09-30 Thread Lars Kruse
Hi Jan-Tarek,

I think, this is just a change based on style preferences, or?
Using single quotes specifically for situation where expansion is not intended
feels quite explicite and clear to me - thus personally I would prefer to stick
with single quotes instead of double quotes combined with escaping.
Or did I miss the point of your change?

Cheers,
Lars

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev



[LEDE-DEV] [patch master 14/15] Expressions don't expand in single quotes, use double quotes for that

2016-09-30 Thread Jan-Tarek Butt
---
 scripts/deptest.sh   |  2 +-
 scripts/ext-toolchain.sh | 24 
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/scripts/deptest.sh b/scripts/deptest.sh
index 0b0e7a9..2b156b3 100755
--- a/scripts/deptest.sh
+++ b/scripts/deptest.sh
@@ -88,7 +88,7 @@ test_package() # $1=pkgname
local SELECTED=
while IFS= read -r conf; do
grep "$conf=" .config > /dev/null && SELECTED=1 && break
-   done < "$(grep CONFIG_PACKAGE tmp/.packagedeps | grep -E "[ /]$pkg\$" | 
sed -e 's,package-$(\(CONFIG_PACKAGE_.*\)).*,\1,')"
+   done < "$(grep CONFIG_PACKAGE tmp/.packagedeps | grep -E "[ /]$pkg\$" | 
sed -e "s,package-\$(\\(CONFIG_PACKAGE_.*\\)).*,\\1,")"
local STAMP_SUCCESS="$STAMP_DIR_SUCCESS/$pkg"
local STAMP_FAILED="$STAMP_DIR_FAILED/$pkg"
local STAMP_BLACKLIST="$STAMP_DIR_BLACKLIST/$pkg"
diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh
index cafdfdb..de36613 100755
--- a/scripts/ext-toolchain.sh
+++ b/scripts/ext-toolchain.sh
@@ -203,16 +203,16 @@ wrap_bin_cc() {
 
echo'#!/bin/sh'> 
"$out"
{
-   echo'for arg in "$@"; do'
-   echo' case "$arg" in -l*|-L*|-shared|-static)'
-   echo -n '  exec "'"$bin"'" '"$CFLAGS"' ${STAGING_DIR:+'
-   echo -n '-idirafter "$STAGING_DIR/usr/include" '
-   echo -n '-L "$STAGING_DIR/usr/lib" '
-   echo'-Wl,-rpath-link,"$STAGING_DIR/usr/lib"} "$@" ;;'
+   echo"for arg in \"\$@\"; do"
+   echo" case \"\$arg\" in -l*|-L*|-shared|-static)"
+   echo -n "  exec \"$bin\" $CFLAGS \${STAGING_DIR:+"
+   echo -n "-idirafter \"\$STAGING_DIR/usr/include\" "
+   echo -n "-L \"\$STAGING_DIR/usr/lib\" "
+   echo"-Wl,-rpath-link,\"\$STAGING_DIR/usr/lib\"} \"\$@\" ;;"
echo' esac'
echo'done'
-   echo -n 'exec "'"$bin"'" '"$CFLAGS"' ${STAGING_DIR:+'
-   echo'-idirafter "$STAGING_DIR/usr/include"} "$@"'
+   echo -n "exec \"$bin\" $CFLAGS \${STAGING_DIR:+"
+   echo"-idirafter \"\$STAGING_DIR/usr/include\"} \"\$@\""
} >> "$out"
 
chmod +x "$out"
@@ -224,9 +224,9 @@ wrap_bin_ld() {
 
echo'#!/bin/sh'> 
"$out"
{
-   echo -n 'exec "'"$bin"'" ${STAGING_DIR:+'
-   echo -n '-L "$STAGING_DIR/usr/lib" '
-   echo'-rpath-link "$STAGING_DIR/usr/lib"} "$@"'
+   echo -n "exec \"$bin\" \${STAGING_DIR:+"
+   echo -n "-L \"\$STAGING_DIR/usr/lib\" "
+   echo"-rpath-link \"\$STAGING_DIR/usr/lib\"} \"\$@\""
} >> "$out"
 
chmod +x "$out"
@@ -254,7 +254,7 @@ wrap_bins() {
 
if [ -x "$out" ] && ! grep -q STAGING_DIR 
"$out"; then
mv "$out" "$out.bin"
-   bin='$(dirname "$0")/'"${out##*/}"'.bin'
+   bin="\$(dirname \"\$0\")/${out##*/}.bin"
fi
 
case "${cmd##*/}" in
-- 
2.10.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev