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

#!/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