#! /bin/sh
#####################################################################################
getPkg()
{
RESP=""
while [ -z "${RESP}" ]
do
echo "Please select one package to build. The following are the valid packages:
a) aa
b) bb
Package (default: gEntlSrv): \c"
read RESP
case "${RESP:=aa}" in
"a"|"aa")
MODULE="ss"
ENV_ID=69751 ;;
"b"|"bb")
MODULE="rr"
ENV_ID=70031 ;;
*)
echo "
$RESP: invalid response, please try again!
Use the option letter or action keyword."
RESP=""
;;
esac
done
}
getBranch()
{
echo "Please enter the branch you want to checkout from CVS.
Branch name (default: Main trunk): \c"
read RESP
if [ -n "${RESP}" ]
then
BRANCH="-r $RESP"
fi
}
getWorkDir()
{
echo "Please enter your workdir.
Working dir : \c"
read RESP
if [ -n "${RESP}" ]
then
WORKING_DIR=$RESP
fi
}
#####################################################################################
USERID=`whoami`
CVS=/xenv/cvs/X/1.11.22/bin/cvs
export cvs
CVSROOT=":pserver:username@servername:port/RepositoryName"
export CVSROOT
CURR_DIR=$1
echo $CURR_DIR
WORKING_DIR=`pwd`
COMMON="aa/common"
# check args
if [ $# -gt 1 ];then
MODULE=$1
ENV_ID=$2
elif [ $# -gt 2 ];then
MODULE=$1
ENV_ID=$2
BRANCH="-r $3"
echo $BRANCH
else
getPkg
getBranch
getWorkDir
fi
CURRENTDIR=`pwd`
#WORKING_DIR=$CURRENTDIR/$WORKING_DIR
if [ ! -d $WORKING_DIR ];then
mkdir $WORKING_DIR
fi
cd $WORKING_DIR
echo "working dir is "$WORKING_DIR
echo "Removing old files..."
rm -rf $COMMON
rm -rf $MODULE
echo "Checking out $MODULE..."
echo "branch is $BRANCH"
${CVS} -Q checkout -P $BRANCH $COMMON
${CVS} -Q checkout -P $BRANCH $MODULE
cd $MODULE
#if [ $ENV_ID = 86701 ];then
# mv build.properties build.properties.bak
# cat build.properties.bak | sed 's_\${env.aaa\}_bb_g' > build.properties
# rm build.properties.bak
#fi
ksh prepareSource.ksh
find . -name CVS -exec /bin/rm -rf {} \;;find . -name *.#* -exec /bin/rm -rf {} \;
echo "Building ..."
/xenv/stexenv -r $ENV_ID . << ZZ
make package -f *.mk
ZZ
echo "dstream pakcage location ->"
ls ${WORKING_DIR}/${MODULE}/*.dstream
# print EAR file location if it is a BE package
if [ -d ${WORKING_DIR}/${MODULE}/install/applications ]
then
EAR_LOCATION=`ls ${WORKING_DIR}/${MODULE}/install/applications/*.ear`
fi
if [ -n $EAR_LOCATION ]
then
echo "\n\n\n############################################################################\n"
echo "EAR file location -> "
echo $EAR_LOCATION
echo "\n############################################################################\n\n\n"
fi
cd $WORKING_DIR
#####################################################################################
getPkg()
{
RESP=""
while [ -z "${RESP}" ]
do
echo "Please select one package to build. The following are the valid packages:
a) aa
b) bb
Package (default: gEntlSrv): \c"
read RESP
case "${RESP:=aa}" in
"a"|"aa")
MODULE="ss"
ENV_ID=69751 ;;
"b"|"bb")
MODULE="rr"
ENV_ID=70031 ;;
*)
echo "
$RESP: invalid response, please try again!
Use the option letter or action keyword."
RESP=""
;;
esac
done
}
getBranch()
{
echo "Please enter the branch you want to checkout from CVS.
Branch name (default: Main trunk): \c"
read RESP
if [ -n "${RESP}" ]
then
BRANCH="-r $RESP"
fi
}
getWorkDir()
{
echo "Please enter your workdir.
Working dir : \c"
read RESP
if [ -n "${RESP}" ]
then
WORKING_DIR=$RESP
fi
}
#####################################################################################
USERID=`whoami`
CVS=/xenv/cvs/X/1.11.22/bin/cvs
export cvs
CVSROOT=":pserver:username@servername:port/RepositoryName"
export CVSROOT
CURR_DIR=$1
echo $CURR_DIR
WORKING_DIR=`pwd`
COMMON="aa/common"
# check args
if [ $# -gt 1 ];then
MODULE=$1
ENV_ID=$2
elif [ $# -gt 2 ];then
MODULE=$1
ENV_ID=$2
BRANCH="-r $3"
echo $BRANCH
else
getPkg
getBranch
getWorkDir
fi
CURRENTDIR=`pwd`
#WORKING_DIR=$CURRENTDIR/$WORKING_DIR
if [ ! -d $WORKING_DIR ];then
mkdir $WORKING_DIR
fi
cd $WORKING_DIR
echo "working dir is "$WORKING_DIR
echo "Removing old files..."
rm -rf $COMMON
rm -rf $MODULE
echo "Checking out $MODULE..."
echo "branch is $BRANCH"
${CVS} -Q checkout -P $BRANCH $COMMON
${CVS} -Q checkout -P $BRANCH $MODULE
cd $MODULE
#if [ $ENV_ID = 86701 ];then
# mv build.properties build.properties.bak
# cat build.properties.bak | sed 's_\${env.aaa\}_bb_g' > build.properties
# rm build.properties.bak
#fi
ksh prepareSource.ksh
find . -name CVS -exec /bin/rm -rf {} \;;find . -name *.#* -exec /bin/rm -rf {} \;
echo "Building ..."
/xenv/stexenv -r $ENV_ID . << ZZ
make package -f *.mk
ZZ
echo "dstream pakcage location ->"
ls ${WORKING_DIR}/${MODULE}/*.dstream
# print EAR file location if it is a BE package
if [ -d ${WORKING_DIR}/${MODULE}/install/applications ]
then
EAR_LOCATION=`ls ${WORKING_DIR}/${MODULE}/install/applications/*.ear`
fi
if [ -n $EAR_LOCATION ]
then
echo "\n\n\n############################################################################\n"
echo "EAR file location -> "
echo $EAR_LOCATION
echo "\n############################################################################\n\n\n"
fi
cd $WORKING_DIR
发表评论
-
unix study
2012-06-21 16:47 651dgfffffffffffffffffffffffffffff ... -
unix
2012-06-19 17:41 0fetgggggggggggggggggggggggggggg ... -
checkout.sh
2012-06-19 17:32 809ME=checkout.sh #echo - Check f ... -
gbuild.sh
2012-06-19 17:29 1012ME=gbuild.sh #echo - Check for ... -
xbuild.sh
2012-06-19 17:25 988ME=xbuild.sh #echo - Check for ... -
build.sh
2012-06-19 17:21 870ME=build.sh #echo - Check for ... -
tree.ksh
2012-06-19 15:18 620#!/bin/bash # tree.sh # Writt ... -
project -lib4
2012-06-18 17:02 0dffffffffffffffffffffffffffffff ... -
prject - lib3
2012-06-18 16:55 0sdfsdgreyyyyhhhhhhhhhhhhhhhh -
prject -lib2
2012-06-18 16:52 0sddddddddddddddddddddddddf -
project1 - lib
2012-06-18 16:48 0sfffffffffffffffffff -
project1
2012-06-18 16:45 0sfsfdsfdsffdf -
tool.ksh
2012-06-06 10:34 666#! /bin/sh ################## ... -
Question
2012-05-08 13:56 6821. java存在内存泄露吗?什么情况下会出现? 2. ind ... -
Unix kshell fragments arrangement
2012-05-08 11:24 618RESP="" 判断是否为空 : if [ ...
相关推荐
Linux version 3.10.0-862.el7.x86_64 (mockbuild@x86-034.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Wed Mar 21 18:14:51 EDT 2018 查看内核版本 [root@...
Expert Shell Scripting ...Use scripts to build complete Linux systems. Script X Window without getting lost in configuration files. Ignore Python, and script in bash and ksh instead.
- **命令**: `yum install -y binutils compat-lib* gcc* glibc* ksh* libgcc* libstdc* libaio* make* sysstat* elfutils*` - **作用**: 确保安装了Oracle数据库所需的所有依赖库。 **5. 单独上传至系统,并安装...
For example (assuming sh/bash/ksh): CC=gcc ./configure make A similar example using csh: setenv CC gcc ./configure make Much of the code and documentation enclosed is copyright by the Free ...
这些软件包包括 rpm、libaio1、ksh、libtool 和 build-essential。使用以下命令安装这些软件包: sudo apt-get install rpm libaio1 ksh libtool build-essential 此外,还需要安装 libstdc++5,否则 Oracle 11g ...
[root@localhost ~]# yum install -y binutils* compat-lib* gcc* glibc* ksh* libgcc* libstdc* libaio* make* sysstat* ``` ##### 4. 创建用户组与用户 为了满足Oracle 11g的安全需求,需创建特定的用户组与用户...
# yum install -y rpm-build # yum install -y kernel-devel glibc-devel gcc # rpm -ivh libstdc++-4.4.7-3.el6.i686.rpm # rpm -ivh compat-libstdc++-33-3.2.3-69.el6.i686.rpm ``` ##### 解压安装包 - 将`...
sudo apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool rpm lsb-rpm sudo apt-get install gcc lesstif2 libc6 libc6-dev libstdc++5 xorg unzip sudo apt-get install xauth libxp6 ...
# yum install -y rpm-build # yum install -y kernel-devel glibc-devel gcc # rpm -ivh libstdc++-4.4.7-3.el6.i686.rpm # rpm -ivh compat-libstdc++-33-3.2.3-69.el6.i686.rpm ``` 2. **解压安装包** - ...
apt-get install libxp-dev sysstat ksh csh libaio-dev binutils libc6 gcc make libaio1 libstdc++5 gawk tcsh libmotif3 alien rcconf ``` #### 四、Oracle 用户与组创建 ##### 1. 创建 Oracle 相关组 ```bash ...
接下来,切换到`sybase`用户并编辑`.profile`(如果是sh或ksh shell)或`.cshrc`(如果是csh shell),添加必要的环境变量。例如,在`.profile`中设置`SYBASE`、`DSQUERY`、`PATH`和`LD_LIBRARY_PATH`,确保Sybase的...
sudo apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm ``` 注意:`lsb-rpm` 包可能需要手动添加到软件源中,这是因为某些版本的 Ubuntu 默认不会包含该包。如果遇到版权或合法...
sudo chmod -R 777 /opt/Abaqus/*使用DSYInsAppliGUI将libpng12.so.0复制到所有文件夹: //linux_a64/code/bin/安装先决条件: sudo apt install ksh gcc g++ gfortran libstdc++5 build-essential make libjpeg62...
- `apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb rpm` #### Step 6: 修改/bin/sh的默认链接 - **目的**:避免安装过程中因默认shell为dash而导致的问题。 - **步骤**: - 进入...
sudo apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm ``` - 这些库包括编译器、链接器以及其他可能被 Oracle 安装过程中使用的工具。 **2. 创建用户组及用户:** - 创建...
- 库文件:libstdc++5、build-essential、make、libjpeg62、libmotif-dev、libglu1-mesa,这些库文件分别支持标准C++库、构建重要软件所必需的工具、Make程序、JPEG格式图片处理、Motif图形用户界面以及OpenGL。...
- 采用VMware Server Version 2.0.2 Build 203138作为虚拟化平台。 - 数据库版本为Oracle 11.2.0.1,包括Grid Infrastructure。 - 操作系统选用Oracle Linux Server 6.2,简化后续额外文件需求。 - 规划虚拟机...