# This is a one-time HACK for the removal of the _minimal archspecs,
# which have been merged into the main ones with 0.7.0 .
# We set the config to the corresponding normal archspec.
# This is NO sorcery API. A spell is not allowed to ever do this.
# And here it comes, on 2007-01-23, to be removed after some decent
# transition period:

message "current arch: $ARCHITECTURE" &&

# these regexes did work with bash 3.1, should work since 3.0

# only act if we are going to modify the host system's archspecs
if [[ "$INSTALL_ROOT" =~ '^/*$' ]]; then
  message "checking if your architecture setting needs fixing..." &&
  if [[ "$ARCHITECTURE" =~ '^(.*)_minimal$' ]]; then
    message "going to fix your architecture setting to ${BASH_REMATCH[1]}" &&
    modify_local_config "ARCHITECTURE" "${BASH_REMATCH[1]}"
  fi
fi
