Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 44 lines (32 sloc) 796 Bytes
#!/bin/sh
. config/options
$SCRIPTS/kconfiginit
DEFCONFIG_PATH="$CONFIG/defconfigs"
DOT_CONFIG="`ls -d $ROOT/$BUILD_NOARCH/kconfig-frontends-*`/.config"
refresh_cfg() {
local cfg=`basename $1 .conf`
$SCRIPTS/loadcfg $cfg
$SCRIPTS/savecfg $cfg
}
if [ -n "$1" ]; then
CFG_FILENAME="${DEFCONFIG_PATH}/$1.conf"
if [ ! -f "$CFG_FILENAME" ]; then
echo "File not found: $CFG_FILENAME"
exit 1
fi
fi
if [ -r "$DOT_CONFIG" ]; then
BACKUP_CONFIG=`mktemp`
cat $DOT_CONFIG > $BACKUP_CONFIG
echo "saved current .config in $BACKUP_CONFIG"
trap "cp $BACKUP_CONFIG $DOT_CONFIG; rm -f $BACKUP_CONFIG" INT TERM EXIT
fi
touch VERSION
if [ -n "$CFG_FILENAME" ]; then
refresh_cfg $CFG_FILENAME
else
for cfg in $DEFCONFIG_PATH/*.conf; do
refresh_cfg $cfg
done
fi
exit 0