source: freewrt/scripts/restore-defaultconf.sh@ f855d85

Last change on this file since f855d85 was a21663d, checked in by Thorsten Glaser <tg@…>, 19 years ago

revert 2219, sorry dnehring@ you were wrong
read the list of “patterns” in mk/build.mk then you'll understand

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

  • Property mode set to 100644
File size: 359 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.