source: freewrt/scripts/restore-defaultconf.sh@ 919947c

Last change on this file since 919947c was 2aa5e7a, checked in by Dirk Nehring <dnehring@…>, 19 years ago

Fix problem where substrings are not handled correctly in "make allmodconfig". Example: BUSYBOX_CONFIG_FEATURE_IFUPDOWN and BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2219 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 368 bytes
Line 
1# $FreeWRT$
2
3# restore patterns given in $@
4# in .config using defaults found
5# in Config.default.
6
7restore() { # (pattern)
8 printf ',g/%s[ =]/d\nwq\n' "$1" | ed -s .config || return 1
9 grep "$1[ =]" Config.default >> .config
10 return $?
11}
12
13for pattern in "$@" ; do
14 restore "$pattern" || echo "WARNING: internal restoring of defaults by pattern $pattern failed!"
15done
Note: See TracBrowser for help on using the repository browser.