OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: lib/sde-config/migrate.sh
  6. # Copyright (C) 2008 The OpenSDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. [ -n "$SDEROOT" ] ||
  16. export SDEROOT=$( cd "${0%/*}/../.."; pwd -P )
  17. . "$SDEROOT/lib/libsde.in"
  18. set -e
  19. # $1 has to be an existant config id, validate it
  20. config_file="$SDEROOT/config/$1/config"
  21. [ -s "$config_file" ] || echo_abort 1 "config/$1: invalid config id."
  22. # ROCKCFG* -> SDECFG*
  23. #
  24. if grep -q 'ROCKCFG' "$config_file"; then
  25. echo_warning "config/$1: config migrated from ROCKLinux style."
  26. sed -i -e 's,ROCKCFG,SDECFG,g' "$config_file"
  27. fi
  28. # SDECFG_ABORT_ON_ERROR_AFTER -> SDECFG_CONTINUE_ON_ERROR_AFTER
  29. #
  30. if grep -q 'SDECFG_ABORT_ON_ERROR_AFTER' "$config_file"; then
  31. echo_warning "config/$1: updating config file to new namings."
  32. sed -i -e 's,SDECFG_ABORT_ON_ERROR_AFTER,SDECFG_CONTINUE_ON_ERROR_AFTER,' "$config_file"
  33. fi