#!/bin/bash
#
# restore patterns given in $@
# in .config using defaults found
# in Config.default.

restore() { # (pattern)
	sed -i "s/^.*$1.*$//g" .config || return 1
	grep $1 Config.default >> .config
	return $?
}

for pattern in $@ ; do
	restore $pattern || echo "WARNING: internal restoring of defaults by pattern $pattern failed!"
done

