Skip to content

Commit

Permalink
opkg: fix stray \ warnings with grep-3.8
Browse files Browse the repository at this point in the history
We simply grep for "src/". So no need for "\/".
Furthermore, since grep-3.8 this creates warnings.

As written in the grep-3.8 announcement:
  Regular expressions with stray backslashes now cause warnings, as
  their unspecified behavior can lead to unexpected results.
  For example, '\a' and 'a' are not always equivalent
  <https://bugs.gnu.org/39678>.

Fixes a warning during the first boot:
  grep: warning: stray \ before /

Signed-off-by: Georgi Valkov <[email protected]>
  • Loading branch information
httpstorm authored and PolynomialDivision committed May 13, 2024
1 parent 1a544dc commit eb1b022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/system/opkg/files/20_migrate-feeds
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

[ -f /etc/opkg.conf ] && grep -q "src\/" /etc/opkg.conf || exit 0
[ -f /etc/opkg.conf ] && grep -q "src/" /etc/opkg.conf || exit 0

echo -e "# Old feeds from previous image\n# Uncomment to reenable\n" >> /etc/opkg/customfeeds.conf
sed -n "s/.*\(src\/.*\)/# \1/p" /etc/opkg.conf >> /etc/opkg/customfeeds.conf
Expand Down

0 comments on commit eb1b022

Please sign in to comment.