From f7d6813e0cff09e2d8a54d6095f2f88f737b98ac Mon Sep 17 00:00:00 2001 From: agibert Date: Tue, 13 Jan 2009 13:27:53 +0000 Subject: [PATCH] - Add AIX support, - Add --list (-l), --listid (-li) and --listenv (-le) options. - Add and rework many scripts in etc/envmng.d directory... --- ReadMe.txt | 16 ++++---- ReleaseNotes.txt | 14 ++++++- bin/envmng | 78 +++++++++++++++++++++++++++------------ etc/envmng.d/aix-32 | 23 ++++++++++++ etc/envmng.d/aix-64 | 23 ++++++++++++ etc/envmng.d/aix-system | 48 ++++++++++++++++++++++++ etc/envmng.d/cristal | 9 ++++- etc/envmng.d/d2target | 9 ++++- etc/envmng.d/dtarget | 9 ++++- etc/envmng.d/env_template | 9 ++++- etc/envmng.d/gnu | 18 ++++++--- etc/envmng.d/hpux-32 | 23 ++++++++++++ etc/envmng.d/hpux-64 | 23 ++++++++++++ etc/envmng.d/hpux-system | 48 ++++++++++++++++++++++++ etc/envmng.d/ic | 9 ++++- etc/envmng.d/imr | 9 ++++- etc/envmng.d/java14 | 32 ++++++++++++++++ etc/envmng.d/migtt2 | 24 ++++++++++++ etc/envmng.d/mqm-32 | 32 ++++++++++++++++ etc/envmng.d/mqm-64 | 32 ++++++++++++++++ etc/envmng.d/ora10 | 46 +++++++++++++++++++++++ etc/envmng.d/ora817a | 9 ++++- etc/envmng.d/ora920 | 9 ++++- etc/envmng.d/ora920a | 9 ++++- etc/envmng.d/purify | 9 ++++- etc/envmng.d/pvcs | 9 ++++- etc/envmng.d/shell | 9 ++++- etc/envmng.d/snav | 9 ++++- etc/envmng.d/stk | 9 ++++- etc/envmng.d/tux80 | 9 ++++- etc/envmng.d/tux80a | 9 ++++- etc/envmng.d/user | 35 ++++++++++++++---- etc/envmng.d/vac | 33 +++++++++++++++++ 33 files changed, 615 insertions(+), 77 deletions(-) create mode 100644 etc/envmng.d/aix-32 create mode 100644 etc/envmng.d/aix-64 create mode 100644 etc/envmng.d/aix-system create mode 100644 etc/envmng.d/hpux-32 create mode 100644 etc/envmng.d/hpux-64 create mode 100644 etc/envmng.d/hpux-system create mode 100644 etc/envmng.d/java14 create mode 100644 etc/envmng.d/migtt2 create mode 100644 etc/envmng.d/mqm-32 create mode 100644 etc/envmng.d/mqm-64 create mode 100644 etc/envmng.d/ora10 create mode 100644 etc/envmng.d/vac diff --git a/ReadMe.txt b/ReadMe.txt index 2c66c9c..d0b0450 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,7 +1,7 @@ # $RCSfile: ReadMe.txt,v $ -# $Revision: 1.2 $ +# $Revision: 1.3 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ @@ -13,8 +13,8 @@ Welcome to EnvMng (Unix shell Environment Manager) ! This release of EnvMng supports the following OSes: - - AIX 5.3, - - HP UX 11.0. + - AIX 5.3, + - HP UX 11.0. EnvMng is licensed under the GNU GPL Licenses. For more information, please read the corresponding source file headers. @@ -88,10 +88,10 @@ clear EnvMng Id List (/etc/envmng_id) ------------------------------------------------------------------------------- -dtarget: user:shell:ora920:tux80:dtarget:snav:pvcs:64bits:system:gnu -dtarget-gnu: user:gnu:shell:ora920:tux80:dtarget:snav:pvcs:64bits:system -d2target: user:shell:ora817a:tux80a:d2target:snav:pvcs:32bits:system:gnu -d2target-gnu: user:gnu:shell:ora817a:tux80a:d2target:snav:pvcs:32bits:system +dtarget: user:shell:ora920:tux80:dtarget:snav:pvcs:64bits:system:gnu +dtarget-gnu: user:gnu:shell:ora920:tux80:dtarget:snav:pvcs:64bits:system +d2target: user:shell:ora817a:tux80a:d2target:snav:pvcs:32bits:system:gnu +d2target-gnu: user:gnu:shell:ora817a:tux80a:d2target:snav:pvcs:32bits:system diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 00ce3f5..8d57414 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,13 +1,23 @@ # $RCSfile: ReleaseNotes.txt,v $ -# $Revision: 1.2 $ +# $Revision: 1.3 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +-------------------------------------------------------------------------------- +EnvMng V 1.2.0 - A. Gibert - 2005/08/01 +-------------------------------------------------------------------------------- + +- New release for MigTT2 (Migration to Target 2) project (Banque de France - Paris), +- Add support for AIX, +- Fix minor bugs. + + + -------------------------------------------------------------------------------- EnvMng V 1.1.0 - A. Gibert - 2005/05/01 -------------------------------------------------------------------------------- diff --git a/bin/envmng b/bin/envmng index 1950bf2..969a0f9 100644 --- a/bin/envmng +++ b/bin/envmng @@ -1,7 +1,7 @@ -# $RCSfile: envmng,v $ -# $Revision: 1.1 $ +# $RCS envmng,v $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ # envmng - Unix shell Environment Manager @@ -23,22 +23,22 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - EnvMng_Cmd="$1" EnvMng_Env="$2" EnvMng_Opt="$3" -envmng_prefix=/home/dtarget/envmng +envmng_prefix=/usr/local/bin envmng_d=$envmng_prefix/etc/envmng.d envmng_id=$envmng_prefix/etc/envmng_id envmng_protvar=$envmng_prefix/etc/envmng_protvar envmng_protalias=$envmng_prefix/etc/envmng_protalias envmng_display=$envmng_prefix/etc/envmng_display +basename=/bin/basename env=/bin/env sed=/bin/sed grep=/bin/grep +printf=/bin/printf alias envmng=". $envmng_prefix/bin/envmng" @@ -79,6 +79,8 @@ envmng_path_rm() +#set +o nounset + case "$EnvMng_Cmd" in -b | --bash) if [ "$EnvMng_Env" != "" ] @@ -90,12 +92,12 @@ case "$EnvMng_Cmd" in then echo "envmng: new shell: [bash] seting id: [$ENVMNG_ID]..." - export NEW_SHELL=/home/dtarget/local/bin/bash + export NEW_SHELL=/usr/local/bin/bash $NEW_SHELL unset NEW_SHELL else echo "envmng: allready in: [bash] seting id: [$ENVMNG_ID]..." - . /home/dtarget/envmng/bin/envmng --setid $ENVMNG_ID $EnvMng_Opt + . /usr/local/bin/envmng --setid $ENVMNG_ID $EnvMng_Opt fi ;; @@ -114,7 +116,7 @@ case "$EnvMng_Cmd" in unset NEW_SHELL else echo "envmng: allready in: [ksh] seting id: [$ENVMNG_ID]..." - . /home/dtarget/envmng/bin/envmng --setid $ENVMNG_ID $EnvMng_Opt + . /usr/local/bin/envmng --setid $ENVMNG_ID $EnvMng_Opt fi ;; @@ -123,7 +125,7 @@ case "$EnvMng_Cmd" in export ENVMNG_ID=$EnvMng_Env - . $envmng_prefix/bin/envmng --reset $($grep "^$EnvMng_Env:" $envmng_id | $sed "s/^$EnvMng_Env:[ \ ]*//") $EnvMng_Opt + . $envmng_prefix/bin/envmng --reset "$($grep "^$EnvMng_Env:" $envmng_id | $sed "s/^$EnvMng_Env:[ \ ]*//")" $EnvMng_Opt ;; -R | --reset) @@ -150,7 +152,7 @@ case "$EnvMng_Cmd" in echo "envmng: reseting aliases..." - alias_list=$(alias | $sed -e "s/alias //" -e "s/=.*//") + alias_list=$(alias | $grep ".*=" | $sed -e "s/alias //" -e "s/=.*//") if [ "$alias_list" != "" ] then @@ -249,23 +251,53 @@ case "$EnvMng_Cmd" in echo "ENVMNG_ID: [$ENVMNG_ID] ENVMNG_LIST: [$ENVMNG_LIST]" ;; + -l | --list) + echo "Id and EnvList:" + . $envmng_prefix/bin/envmng --listid + + echo + echo "Env:" + . $envmng_prefix/bin/envmng --listenv + ;; + + -li | --listid) + for line in $( $grep -v "^#" $envmng_id | $sed "s/:[ \ ]*/#/") + do + $printf "%-16s %s\n" $( echo $line | $sed "s/#.*/:/") $( echo $line | $sed "s/^.*#//") + done + ;; + + -le | --listenv) + for file in $envmng_d/* + do + if [[ ( -f $file ) && ( $file != *~ ) && ( $file != */env_template ) ]] + then + $printf "%-16s " $( echo $( $basename $file):) + echo $( $grep "^# description: " $file | $sed "s/^. description: //") + fi + done + ;; + -h | --help) echo "Usage: envmng [COMMAND] [OPTION]" - echo " -b, --bash [] [norc] switch to bash and set id to " - echo " -k, --ksh [] [norc] switch to ksh and set id to " - echo " -S, --setid [norc] set id to " - echo " -R, --reset reset envlist to " - echo " -a, --add [head|tail] add in envlist head or tail" - echo " -d, --del del from envlist" - echo " -p, --profile [] do envlist or profile" - echo " -r, --rc [] do envlist or rc" - echo " -s, --status print status" - echo " -h, --help print this help" - echo " -V, --version print version" + echo " -b, --bash [] [norc] switch to bash and set id to " + echo " -k, --ksh [] [norc] switch to ksh and set id to " + echo " -S, --setid [norc] set id to " + echo " -R, --reset reset envlist to " + echo " -a, --add [head|tail] add in envlist head or tail" + echo " -d, --del del from envlist" + echo " -p, --profile [] do envlist or profile" + echo " -r, --rc [] do envlist or rc" + echo " -s, --status print status" + echo " -l, --list list Id(s), EnvList(s) and Env(s)" + echo " -li, --listid list Id(s) and EnvList(s)" + echo " -le, --listenv list Env(s)" + echo " -h, --help print this help" + echo " -V, --version print version" ;; -V | --version) - echo "envmng V 1.1" + echo "envmng V 1.2" ;; *) diff --git a/etc/envmng.d/aix-32 b/etc/envmng.d/aix-32 new file mode 100644 index 0000000..abbb579 --- /dev/null +++ b/etc/envmng.d/aix-32 @@ -0,0 +1,23 @@ +# $RCSfile: aix-32,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: AIX 32 bits mode +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export OBJECT_MODE=32 + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/aix-64 b/etc/envmng.d/aix-64 new file mode 100644 index 0000000..ecf319d --- /dev/null +++ b/etc/envmng.d/aix-64 @@ -0,0 +1,23 @@ +# $RCSfile: aix-64,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: AIX 64 bits mode +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export OBJECT_MODE=64 + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/aix-system b/etc/envmng.d/aix-system new file mode 100644 index 0000000..b0a1d86 --- /dev/null +++ b/etc/envmng.d/aix-system @@ -0,0 +1,48 @@ +# $RCSfile: aix-system,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: AIX System base configuration +#------------------------------------------------------------------------------- + +path=/usr/linux/bin:/usr/ucb:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/opt/seos/bin:/usr/games + +shlib_path=/usr/local/lib + +manpath=/usr/local/man:/opt/seos/man:/opt/freeware/man + + + +case "$1" in + *profile) + export PATH=$(envmng_path_add "$PATH" "$path") + export SHLIB_PATH=$(envmng_path_add "$SHLIB_PATH" "$shlib_path") + export MANPATH=$(envmng_path_add "$MANPATH" "$manpath") + + if [ "$DISPLAY" = "" ] + then + export DISPLAY="$($grep "^$LOGNAME:" $envmng_display | $sed -e "s/^$LOGNAME:[ \ ]*//" -e "s/[ \ ]*#.*$//"):0" + fi + + stty erase ^? + stty kill ^U + stty eol ^@ + stty susp ^Z + stty intr ^C +# stty rprnt ^R + stty werase ^W + stty lnext ^V + ;; + + *rc) + alias ls=ls + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/cristal b/etc/envmng.d/cristal index 3640a1c..edc286f 100644 --- a/etc/envmng.d/cristal +++ b/etc/envmng.d/cristal @@ -1,9 +1,14 @@ # $RCSfile: cristal,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: DIAMIS Cristal +#------------------------------------------------------------------------------- + case "$1" in *profile) export CRISTALDIR=$TARGET_HOME/cristal/appli diff --git a/etc/envmng.d/d2target b/etc/envmng.d/d2target index 5c105e7..d793864 100644 --- a/etc/envmng.d/d2target +++ b/etc/envmng.d/d2target @@ -1,9 +1,14 @@ # $RCSfile: d2target,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: D2Target project environment +#------------------------------------------------------------------------------- + case "$1" in *profile) export TARGET_ID=d2target diff --git a/etc/envmng.d/dtarget b/etc/envmng.d/dtarget index a17f1c6..5dabcfc 100644 --- a/etc/envmng.d/dtarget +++ b/etc/envmng.d/dtarget @@ -1,9 +1,14 @@ # $RCSfile: dtarget,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: DTarget project environment +#------------------------------------------------------------------------------- + case "$1" in *profile) export TARGET_ID=dtarget diff --git a/etc/envmng.d/env_template b/etc/envmng.d/env_template index 1d78181..5ddd1d6 100644 --- a/etc/envmng.d/env_template +++ b/etc/envmng.d/env_template @@ -1,9 +1,14 @@ # $RCSfile: env_template,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: +#------------------------------------------------------------------------------- + case "$1" in *profile) ;; diff --git a/etc/envmng.d/gnu b/etc/envmng.d/gnu index 1719b34..2999dd9 100644 --- a/etc/envmng.d/gnu +++ b/etc/envmng.d/gnu @@ -1,14 +1,19 @@ # $RCSfile: gnu,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ -path=/home/dtarget/local/bin +# EnvMng Environment configuration +# +# description: GNU softwares and libraries +#------------------------------------------------------------------------------- -shlib_path=/home/dtarget/local/lib +path=/usr/local/bin -manpath=/home/dtarget/local/man:/home/dtarget/local/share/man +shlib_path=/usr/local/lib + +manpath=/usr/local/man:/usr/local/share/man @@ -17,6 +22,9 @@ case "$1" in export PATH=$(envmng_path_add "$PATH" "$path") export SHLIB_PATH=$(envmng_path_add "$SHLIB_PATH" "$shlib_path") export MANPATH=$(envmng_path_add "$MANPATH" "$manpath") + + export LESS=-MM + export LESSOPEN='|/usr/local/bin/lesspipe.sh %s' ;; *rc) diff --git a/etc/envmng.d/hpux-32 b/etc/envmng.d/hpux-32 new file mode 100644 index 0000000..54c4f8e --- /dev/null +++ b/etc/envmng.d/hpux-32 @@ -0,0 +1,23 @@ +# $RCSfile: hpux-32,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: HP/UX 32 bits mode +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export ARCH=32BITS + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/hpux-64 b/etc/envmng.d/hpux-64 new file mode 100644 index 0000000..820314f --- /dev/null +++ b/etc/envmng.d/hpux-64 @@ -0,0 +1,23 @@ +# $RCSfile: hpux-64,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: HP/UX 64 bits mode +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export ARCH=64BITS + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/hpux-system b/etc/envmng.d/hpux-system new file mode 100644 index 0000000..8570bfa --- /dev/null +++ b/etc/envmng.d/hpux-system @@ -0,0 +1,48 @@ +# $RCSfile: hpux-system,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: HP/UX System base configuration +#------------------------------------------------------------------------------- + +path=/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/hparray/bin:/opt/perf/bin:/opt/ignite/bin:/opt/OV/bin/OpC:/opt/resmon/bin:/opt/pred/bin:/opt/langtools/bin:/opt/imake/bin:/opt/aCC/bin:/opt/cxperf/bin:/opt/scr/bin:/opt/graphics/common/bin:/opt/STK/bin:/opt/seos/bin + +shlib_path=/usr/lib + +manpath=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/usr/dt/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/perf/man/%L:/opt/perf/man:/opt/OV/man/itose/%L:/opt/OV/man/itose:/opt/resmon/share/man:/opt/pred/share/man/%L:/opt/pred/share/man:/opt/mqm/man:/opt/audio/share/man:/opt/blinklink/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/imake/man:/opt/aCC/share/man/%L:/opt/aCC/share/man:/opt/cxperf/share/man:/opt/scr/share/man:/opt/graphics/common/man:/opt/EMCpower/share:/opt/STK/share/man + + + +case "$1" in + *profile) + export PATH=$(envmng_path_add "$PATH" "$path") + export SHLIB_PATH=$(envmng_path_add "$SHLIB_PATH" "$shlib_path") + export MANPATH=$(envmng_path_add "$MANPATH" "$manpath") + + if [ "$DISPLAY" = "" ] + then + export DISPLAY="$($grep "^$LOGNAME:" $envmng_display | $sed -e "s/^$LOGNAME:[ \ ]*//" -e "s/[ \ ]*#.*$//"):0" + fi + + stty erase ^? + stty kill ^U + stty eol ^@ + stty susp ^Z + stty intr ^C +# stty rprnt ^R + stty werase ^W + stty lnext ^V + ;; + + *rc) + alias ls=ls + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/ic b/etc/envmng.d/ic index 2837d7a..6533cc9 100644 --- a/etc/envmng.d/ic +++ b/etc/envmng.d/ic @@ -1,9 +1,14 @@ # $RCSfile: ic,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: IC (BDF Interlinking Component) application +#------------------------------------------------------------------------------- + case "$1" in *profile) export ICDIR=$TARGET_HOME/ic/appli diff --git a/etc/envmng.d/imr b/etc/envmng.d/imr index d9e92fd..05d7d6b 100644 --- a/etc/envmng.d/imr +++ b/etc/envmng.d/imr @@ -1,9 +1,14 @@ # $RCSfile: imr,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: IMR (Interlinking Message Router) application +#------------------------------------------------------------------------------- + case "$1" in *profile) diff --git a/etc/envmng.d/java14 b/etc/envmng.d/java14 new file mode 100644 index 0000000..14e8754 --- /dev/null +++ b/etc/envmng.d/java14 @@ -0,0 +1,32 @@ +# $RCSfile: java14,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: IBM Java 1.4 (JDK/JRE) +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export JAVA_HOME=/usr/java14 + export JDK_HOME=$JAVA_HOME + export JRE_HOME=$JAVA_HOME/jre + + #---------------------------------------------------------------------------- + # PATH definitions + #---------------------------------------------------------------------------- + + path=$JDK_HOME/bin:$JRE_HOME/bin + export PATH=$(envmng_path_add "$PATH" "$path") + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/migtt2 b/etc/envmng.d/migtt2 new file mode 100644 index 0000000..5dae608 --- /dev/null +++ b/etc/envmng.d/migtt2 @@ -0,0 +1,24 @@ +# $RCSfile: migtt2,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: MigTT2 Project +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export PROJECT_ID=migtt2 + export PROJECT_HOME=/home/$PROJECT_ID + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/mqm-32 b/etc/envmng.d/mqm-32 new file mode 100644 index 0000000..98e05b1 --- /dev/null +++ b/etc/envmng.d/mqm-32 @@ -0,0 +1,32 @@ +# $RCSfile: mqm-32,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: IBM MQSeries 32 bits +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export MQM_HOME=/opt/mqm + + #---------------------------------------------------------------------------- + # PATH definitions + #---------------------------------------------------------------------------- + path=$MQM_HOME/bin + export PATH=$(envmng_path_add "$PATH" "$path") + + shlib_path=$MQM_HOME/lib + export SHLIB_PATH=$(envmng_path_add "$SHLIB_PATH" "$shlib_path") + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/mqm-64 b/etc/envmng.d/mqm-64 new file mode 100644 index 0000000..ce29276 --- /dev/null +++ b/etc/envmng.d/mqm-64 @@ -0,0 +1,32 @@ +# $RCSfile: mqm-64,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: IBM MQSeries 64 bits +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export MQM_HOME=/opt/mqm + + #---------------------------------------------------------------------------- + # PATH definitions + #---------------------------------------------------------------------------- + path=$MQM_HOME/bin + export PATH=$(envmng_path_add "$PATH" "$path") + + shlib_path=$MQM_HOME/lib64:$MQM_HOME/lib + export SHLIB_PATH=$(envmng_path_add "$SHLIB_PATH" "$shlib_path") + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/ora10 b/etc/envmng.d/ora10 new file mode 100644 index 0000000..2f08755 --- /dev/null +++ b/etc/envmng.d/ora10 @@ -0,0 +1,46 @@ +# $RCSfile: ora10,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: Oracle 10 +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export ORACLE_HOME=/home/logiciel/oracle/ora10 + export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data + export NLS_LANG=american_america.we8iso8859p1 + export NLS_SORT=BINARY + export ORACLE_TERM=vt100 +# export ORACLE_RM=Oracle_XA_9 + + export FS01=$PROJECT_HOME/${PROJECT_ID}1 + export FS02=$PROJECT_HOME/${PROJECT_ID}2 + export FS03=$PROJECT_HOME/${PROJECT_ID}3 + + export ORACLE_SID=$(/usr/bin/awk "BEGIN {print toupper(\"$PROJECT_ID\")}") + export BASE=$ORACLE_HOME/dbs/sgadef${ORACLE_SID}.dbf +# export CONFIGORAIC=$PROJECT_HOME/appli/expl/oracle/ora_target/init +# export EXPLORAIC=$PROJECT_HOME/appli/expl/oracle/ora_target + + #---------------------------------------------------------------------------- + # PATH definitions + #---------------------------------------------------------------------------- + path=$ORACLE_HOME/bin + export PATH=$(envmng_path_add "$PATH" "$path") + + shlib_path=$ORACLE_HOME/lib + export SHLIB_PATH=$(envmng_path_add "$SHLIB_PATH" "$shlib_path") + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac diff --git a/etc/envmng.d/ora817a b/etc/envmng.d/ora817a index a41bad0..16dcca9 100644 --- a/etc/envmng.d/ora817a +++ b/etc/envmng.d/ora817a @@ -1,9 +1,14 @@ # $RCSfile: ora817a,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: Oracle 8.17a +#------------------------------------------------------------------------------- + case "$1" in *profile) export ORACLE_HOME=/home/logiciel/oracle/ora817a diff --git a/etc/envmng.d/ora920 b/etc/envmng.d/ora920 index dc3ee3e..042b725 100644 --- a/etc/envmng.d/ora920 +++ b/etc/envmng.d/ora920 @@ -1,9 +1,14 @@ # $RCSfile: ora920,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: Oracle 9.20 +#------------------------------------------------------------------------------- + case "$1" in *profile) export ORACLE_HOME=/home/logiciel/oracle/ora920 diff --git a/etc/envmng.d/ora920a b/etc/envmng.d/ora920a index dbb4a37..c39c772 100644 --- a/etc/envmng.d/ora920a +++ b/etc/envmng.d/ora920a @@ -1,9 +1,14 @@ # $RCSfile: ora920a,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: Oracle 9.20a +#------------------------------------------------------------------------------- + case "$1" in *profile) export ORACLE_HOME=/home/logiciel/oracle/ora920a diff --git a/etc/envmng.d/purify b/etc/envmng.d/purify index 8bbcca8..c7ae0ca 100644 --- a/etc/envmng.d/purify +++ b/etc/envmng.d/purify @@ -1,9 +1,14 @@ # $RCSfile: purify,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: Purify +#------------------------------------------------------------------------------- + path=/opt/rational/releases/PurifyPlusFamily.2003.06.00/hppa_hpux/bin manpath=/opt/rational/releases/purify.hp.2003.06.00/man diff --git a/etc/envmng.d/pvcs b/etc/envmng.d/pvcs index dd2c4f4..f7fa164 100644 --- a/etc/envmng.d/pvcs +++ b/etc/envmng.d/pvcs @@ -1,9 +1,14 @@ # $RCSfile: pvcs,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: PVCS +#------------------------------------------------------------------------------- + case "$1" in *profile) export PVCS_BINDIR=/home/pvcs/vm/hpux11.00/bin diff --git a/etc/envmng.d/shell b/etc/envmng.d/shell index d39135e..122b3b3 100644 --- a/etc/envmng.d/shell +++ b/etc/envmng.d/shell @@ -1,9 +1,14 @@ # $RCSfile: shell,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: Shell default configuration +#------------------------------------------------------------------------------- + case $BASH in *bash) shell=$BASH diff --git a/etc/envmng.d/snav b/etc/envmng.d/snav index 734876b..a51b772 100644 --- a/etc/envmng.d/snav +++ b/etc/envmng.d/snav @@ -1,9 +1,14 @@ # $RCSfile: snav,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: SNAV Source Naviguator +#------------------------------------------------------------------------------- + path=/home/dtarget/sourcenav/bin manpath=/home/dtarget/sourcenav/man diff --git a/etc/envmng.d/stk b/etc/envmng.d/stk index 5a8c0c8..4c8a31c 100644 --- a/etc/envmng.d/stk +++ b/etc/envmng.d/stk @@ -1,9 +1,14 @@ # $RCSfile: stk,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: STERIA Stelink CBT +#------------------------------------------------------------------------------- + case "$1" in *profile) export STELINKDIR=$TARGET_HOME/stelink/appli diff --git a/etc/envmng.d/tux80 b/etc/envmng.d/tux80 index a07dcf6..c1a3ae8 100644 --- a/etc/envmng.d/tux80 +++ b/etc/envmng.d/tux80 @@ -1,9 +1,14 @@ # $RCSfile: tux80,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: Tuxedo 8.0 +#------------------------------------------------------------------------------- + case "$1" in *profile) export TUXDIR=/home/logiciel/tuxedo/tuxedo80 diff --git a/etc/envmng.d/tux80a b/etc/envmng.d/tux80a index 7a5bea6..911420e 100644 --- a/etc/envmng.d/tux80a +++ b/etc/envmng.d/tux80a @@ -1,9 +1,14 @@ # $RCSfile: tux80a,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: Tuxedo 8.0a +#------------------------------------------------------------------------------- + case "$1" in *profile) export TUXDIR=/home/logiciel/tuxedo/tuxedo80a diff --git a/etc/envmng.d/user b/etc/envmng.d/user index 9d3fd50..07707fd 100644 --- a/etc/envmng.d/user +++ b/etc/envmng.d/user @@ -1,9 +1,14 @@ # $RCSfile: user,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2009/01/12 17:59:03 $ +# $Date: 2009/01/13 13:27:53 $ # $Author: agibert $ +# EnvMng Environment configuration +# +# description: User configuration +#------------------------------------------------------------------------------- + path=.:~/bin shlib_path=~/lib @@ -14,23 +19,39 @@ manpath=~/man case "$1" in *profile) - set -o emacs - export PATH=$(envmng_path_add "$PATH" "$path") export SHLIB_PATH=$(envmng_path_add "$SHLIB_PATH" "$shlib_path") export MANPATH=$(envmng_path_add "$MANPATH" "$man_path") - export EDITOR=xemacs - export PAGER=less + if $( which xemacs >/dev/null ) + then + export EDITOR=xemacs + else + export EDITOR=vi + fi + + if $( which less >/dev/null ) + then + export PAGER=less + else + export PAGER=more + fi + + set -o emacs +# set -o vi ;; *rc) export PS1="$(hostname)(\$LOGNAME)[\$ENVMNG_ID]\$PWD> " + alias env-migtt2='envmng -S migtt2-gnu' alias env-dtarget='envmng -S dtarget-gnu' alias env-d2target='envmng -S d2target-gnu' alias env-ksh='envmng --ksh' alias env-bash='envmng --bash' + + set -o emacs +# set -o vi ;; *) @@ -53,4 +74,4 @@ then . ~/.envmng_user $1 fi -echo \ No newline at end of file +echo diff --git a/etc/envmng.d/vac b/etc/envmng.d/vac new file mode 100644 index 0000000..63e72c4 --- /dev/null +++ b/etc/envmng.d/vac @@ -0,0 +1,33 @@ +# $RCSfile: vac,v $ +# $Revision: 1.1 $ +# $Name: $ +# $Date: 2009/01/13 13:27:53 $ +# $Author: agibert $ + +# EnvMng Environment configuration +# +# description: IBM VAC C compiler +#------------------------------------------------------------------------------- + +case "$1" in + *profile) + export VAC_HOME=/usr/vac + + #---------------------------------------------------------------------------- + # PATH definitions + #---------------------------------------------------------------------------- + + path=$VAC_HOME/bin + manpath=$VAC_HOME/man/%L + + export PATH=$(envmng_path_add "$PATH" "$path") + export MANPATH=$(envmng_path_add "$MANPATH" "$manpath") + ;; + + *rc) + ;; + + *) + echo "$0: Invalid command: [$1] !" + ;; +esac