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