Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Select Git revision
  • 7898a6cfd19167783c84c49aace63a510395ac46
  • development default
  • feature/EDELIVERY-15382-rest-api-jwt-authentication-for-dynamic-discovery-client
  • feature/EDELIVERY-13760-translate-server-side-error-messages
  • bugfix/EDELIVERY-14172-domismp-accepts-requests-with-wrong-domain-header-value
  • EDELIVERY-15372-upgrade-libraries-and-plugins-and-update-httpclient-to-httpclient5
  • EDELIVERY-15377-migrate-to-angular-20
  • bugfix/EDELIVERY-14196-select-domain-select-resource-dropdown-should-be-order-alphabetically
  • feature/EDELIVERY-12753-sml-integration-migration-to-different-smp
  • feature/EDELIVERY-13757-extend-session-dialog-should-have-an-active-counter
  • EDELIVERY-15144-sql-update
  • bugfix/EDELIVERY-14326-ui-edit-resource-filters
  • feature/EDELIVERY-15144-domismp-system-notification-generalize-time-expiration-alerts
  • bugfix/EDELIVERY-15102-alert-is-not-appearing-when-adding-duplicated-certificate
  • bugfix/EDELIVERY-15203-small-left-grid-shows-no-data-found-for-1-2-seconds-before-loading-the-data
  • EDELIVERY-15219-search-filter-with-understore-char-does-not-work
  • bugfix/EDELIVERY-15226-certificates-error-when-trying-to-delete-certificates
  • bugfix/EDELIVERY-15224-error-when-trying-to-update-info-from-profile-page
  • bugfix/EDELIVERY-15225-emails-are-not-sent-in-domismp
  • release/5.1.x
  • feature/EDELIVERY-12746-external-secret-sharing-services-as-vaults
  • 5.1.1
  • 5.1
  • 5.1-TEST
  • 5.1-RC1
  • 5.0.1
  • 5.0
  • 5.0-RC1
  • 4.2
  • 4.2-RC1
  • 4.1.2
  • 4.1.1
  • 4.1.0
  • 4.1.0-RC1
  • 4.0.0
  • 4.0.0-RC1
  • 3.0.2
  • 3.0.1
  • 3.0.0
39 results

relinkOracleBinary.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    relinkOracleBinary.sh 1.90 KiB
    #!/bin/bash
    # LICENSE UPL 1.0
    #
    # Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
    #
    # Since: March, 2020
    # Author: rishabh.y.gupta@oracle.com
    # Description: Relinks oracle binary in accordance with the edition passed by the user.
    #
    # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    #
    
    LIB_EDITION="$(/usr/bin/ar t $ORACLE_HOME/lib/libedtn$($ORACLE_HOME/bin/oraversion -majorVersion).a)"
    LIB_EDITION=$(echo ${LIB_EDITION} | cut -d. -f1)
    LIB_EDITION=${LIB_EDITION: -3}
    
    if [ "${LIB_EDITION}" == "ent" ]; then
        CURRENT_EDITION="ENTERPRISE"
    fi
    
    if [ "${LIB_EDITION}" == "std" ]; then
        CURRENT_EDITION="STANDARD"
    fi
    
    # If datafiles already exists
    if [ -d $ORACLE_BASE/oradata/$ORACLE_SID ]; then
        datafiles_edition=$(ls $ORACLE_BASE/oradata/dbconfig/$ORACLE_SID/.docker_* | rev | cut -d_ -f1 | rev)
        if [ "${ORACLE_EDITION}" != "" ] && [ "${ORACLE_EDITION,,}" != $datafiles_edition ]; then
            echo "The datafiles being used were created with $datafiles_edition edition software home. Please pass -e ORACLE_EDITION=$datafiles_edition to the docker run cmd.";
            exit 1;
        elif [ "${ORACLE_EDITION}" == "" ] && [ "${CURRENT_EDITION,,}" != $datafiles_edition ]; then
            echo "The current software home is of ${CURRENT_EDITION,,} edition whereas the datafiles being used were created with $datafiles_edition edition software home. Please pass -e ORACLE_EDITION=$datafiles_edition to the docker run cmd.";
            exit 1;
        fi
    fi
    
    if [ "${ORACLE_EDITION}" != "" ]; then
        if [ "${CURRENT_EDITION}" != "${ORACLE_EDITION^^}" ]; then
            echo "Relinking oracle binary for edition: ${ORACLE_EDITION}";
            cmd="make -f ${ORACLE_HOME}/rdbms/lib/ins_rdbms.mk edition_${ORACLE_EDITION,,} ioracle";
            echo "$cmd";
            $cmd;
            CURRENT_EDITION=${ORACLE_EDITION^^}
        fi
    fi
    
    echo "ORACLE EDITION: ${CURRENT_EDITION}"
    touch $ORACLE_HOME/install/.docker_${CURRENT_EDITION,,}