]> SALOME platform Git repositories - tools/install.git/blob - config_files/release_notes.sh
Salome HOME
cc2c064d58a36385f42ca6f858a6adf37366cebb
[tools/install.git] / config_files / release_notes.sh
1 #!/bin/sh 
2
3 ####################################################################################
4
5 # The script is the part of the SALOME installation procedure.
6 # This script is used to show SALOME Release Notes.
7 #
8 # Copyright : 2006 CEA/DEN, EDF R&D
9 ####################################################################################
10
11 # This procedure checks if the Release Notes file can be shown.
12 # Returns 0 in success and 1 if any error occurs.
13 check_enabled()
14 {
15     ROOT_DIR=`(cd ${SRC_DIR}\.. ; pwd)`;
16     if [ "${ROOT_DIR}" != "" ] ; then 
17         rn_files=`find ${ROOT_DIR} -name "*Release_Notes.pdf"`
18         if [ "$?" == "0" ] && [ "$rn_files" != "" ] ; then
19             return 0;
20         fi
21     fi
22     return 1;
23 }
24
25 # This procedure is used to show Release Notes file.
26 # Returns 0 in success and 1 if any error occurs.
27 execute()
28 {
29     ROOT_DIR=`(cd ${SRC_DIR}\.. ; pwd)`;
30     if [ "${ROOT_DIR}" != "" ] ; then 
31         rn_file=`find ${ROOT_DIR} -name "*Release_Notes.pdf"`
32         if [ "$?" == "0" ] && [ "$rn_file" != "" ] ; then
33             xpdf=`which xpdf >& /dev/null`
34             if [ "$?" == "0" ] ; then
35                 xpdf ${rn_file} &
36                 return 0;
37             fi
38         fi
39     fi
40     return 1;
41 }
42
43 # Set general usage variables from the command line parameters:
44 #     $0 is the path to this script itself
45 #     $1 is the name of the procedure to be run
46 #     $2 is the installation directory path
47 #     $3 is the temporary directory path
48 SCRIPT_DIR=`dirname $0`
49 PROCEDURE=$1;
50 INSTALL_ROOT=$2;
51 INSTALL_WORK=$3;
52
53 # Run the procedure
54 $PROCEDURE