Browse Source

Changed bin/sde-download, lib/parse-config, scripts/Build-Target and scripts/Config to use lib/sde-config/migrate.sh to validate and migrate a given $config

karasz/new-early
Alejandro Mery 17 years ago
parent
commit
5d5ceffc24
4 changed files with 4 additions and 18 deletions
  1. +1
    -5
      bin/sde-download
  2. +1
    -6
      lib/parse-config
  3. +1
    -3
      scripts/Build-Target
  4. +1
    -4
      scripts/Config

+ 1
- 5
bin/sde-download

@ -659,7 +659,7 @@ repository() {
required() {
# Choosen config must exist
#
if [ ! -f config/$config/packages ]; then
if ! ./lib/sde-config/migrate.sh "$config"; then
echo "ERROR: Config $config doesn't exist."
echo "ERROR: try ./scripts/Config -cfg $config first."
exit 1
@ -674,10 +674,6 @@ required() {
fi
done < config/$config/packages
# NOTE: ROCKCFG -> SDECFG automatized convertion
grep -q 'ROCKCFG' ./config/$config/config &&
sed -i -e 's,ROCKCFG,SDECFG,g' ./config/$config/config
target=`grep '^export SDECFG_TARGET=' config/$config/config | \
cut -f2 -d= | tr -d "'"`
targetchain="$target"; x="$target"

+ 1
- 6
lib/parse-config

@ -27,12 +27,7 @@ arch_sizeof_long_long=undef ; arch_sizeof_int=undef ; export arch_machine=unde
arch_sizeof_char_p=undef ; arch_sizeof_long=undef ; arch_bigendian=undef
arch_sizeof_short=undef ; arch_target=any-unknown-linux
if [ -f config/$config/config ]
then
# NOTE: ROCKCFG -> SDECFG automatized convertion
grep -q 'ROCKCFG' ./config/$config/config &&
sed -i -e 's,ROCKCFG,SDECFG,g' ./config/$config/config
if ./lib/sde-config/migrate.sh "$config"; then
. config/$config/config
else
echo

+ 1
- 3
scripts/Build-Target

@ -45,9 +45,7 @@ while [ $# -gt 0 ] ; do
shift
done
# NOTE: ROCKCFG -> SDECFG automatized convertion
grep -q 'ROCKCFG' ./config/$config/config &&
sed -i -e 's,ROCKCFG,SDECFG,g' ./config/$config/config
./lib/sde-config/migrate.sh "$config" || exit 1
if [ "$daemon_mode" = 1 ] ; then
. config/$config/config

+ 1
- 4
scripts/Config

@ -93,7 +93,7 @@ if [ $do_config_cycle = 0 ] ; then
# don't accept Ctrl-C because it destroy the configurations
trap '' INT
if [ -d config/$config ]; then
if ./lib/sde-config/migrate.sh "$config"; then
mkdir -p $cfgtmpdir/config/
cp -a config/$config/* $cfgtmpdir/config/
if [ $? -ne 0 ]; then
@ -161,9 +161,6 @@ configtitle="$(printf ' %-50s %6s active packages ]' \
"[ $(echo `grep '^X' $cfgtmpdir/config/packages | wc -l`)" )"
bprof main stop
# NOTE: ROCKCFG -> SDECFG automatized convertion
grep -q 'ROCKCFG' $cfgtmpdir/config/config &&
sed -i -e 's,ROCKCFG,SDECFG,g' $cfgtmpdir/config/config
. $cfgtmpdir/config/config
bprof main start

Loading…
Cancel
Save