Rem
Rem $Header: javavm/install/jvmpsu.sql /st_javavm_12.2.0.1.0ojvmbp/1 2017/04/07 18:16:16 sbusa Exp $
Rem
Rem jvmpsu.sql
Rem
Rem Copyright (c) 2013, 2017, Oracle and/or its affiliates. 
Rem All rights reserved.
Rem
Rem    NAME
Rem      jvmpsu.sql - JAVAVM Patch Set Update script
Rem
Rem    DESCRIPTION
Rem      Script to be run during post-install in a PSU.
Rem
Rem    NOTES
Rem      To be run as SYS
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    sbusa       04/07/17 - Backport sbusa_12_2.0.1_bp_apr_psu from
Rem                           st_javavm_12.2.0.1.0ojvmbp
Rem    nneeluru    10/02/14 - Remove is_valid check; refer bug 19699946 
Rem    nneeluru    08/16/13 - JAVAVM post-install script for PSU
Rem    nneeluru    08/16/13 - Created
Rem
Rem    BEGIN SQL_FILE_METADATA 
Rem    SQL_SOURCE_FILE: javavm/install/jvmpsu.sql 
Rem    SQL_SHIPPED_FILE: javavm/install/jvmpsu.sql 
Rem    SQL_PHASE: INSTALL
Rem    SQL_STARTUP_MODE: NORMAL 
Rem    SQL_IGNORABLE_ERRORS: NONE 
Rem    SQL_CALLING_FILE: catbundle.sql
Rem    END SQL_FILE_METADATA

SET ECHO ON
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 80
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100

variable jvmscript varchar2(50);
column :jvmscript new_value jvm_script noprint;

declare
  stat varchar2(30);
begin
  :jvmscript := '?/javavm/install/jvmempty.sql';
  select status into stat from dba_registry where comp_id = 'JAVAVM';
  if stat != 'REMOVED' then
    :jvmscript := '?/javavm/install/jvmpsui.sql';
  end if;
exception when no_data_found then null;
end;
/

select :jvmscript from dual;

@@&jvm_script

