用tarball实现liferay自动安装部署11-读取configure-helper.sh文件

简介:

当运行configure.sh的第一步就是去读取configure-helper.sh中的文件,从而可以正确的得知整个文件结果的设定,从而可以正确的做各种和文件相关的操作。

 

 
 
  1. #Read the configuration file and set the environment variables 
  2.  
  3. CONFIGURE_SHELL_FILE_NAME="/app/scripts/platform-portal/configure-helper.sh" 
  4.  
  5.   
  6.  
  7. if [ -f "$CONFIGURE_SHELL_FILE_NAME" ]; then 
  8.  
  9.        echo "reading the file path configurations from file: $CONFIGURE_SHELL_FILE_NAME" 
  10.  
  11.      source $CONFIGURE_SHELL_FILE_NAME 
  12.  
  13.   
  14.  
  15. else 
  16.  
  17.                 echo "can not find the path configuration file: $CONFIGURE_SHELL_FILE_NAME ,exiting..." 
  18.  
  19.                 exit 1 
  20.  
  21. fi 
  22.  
  23.   

 

非常简单,就是先判断configure.sh文件是否存在,然后用source命令读取即可,不存在则跳出脚本。





本文转自 charles_wang888 51CTO博客,原文链接:http://blog.51cto.com/supercharles888/979809,如需转载请自行联系原作者

目录
相关文章
|
10月前
|
资源调度
pnpm : 无法加载文件 C:\Users\86183\AppData\Roaming\npm\pnpm.ps1,因为在此系统上禁止运行脚本。
发现了问题,在上一个项目中我是使用的npm来进行安装依赖和运行打包的,在看到这里时才发现了问题,解决的方法就是 1.在系统中搜索框输入 Windos PowerShell,点击以管理员身份运行
解决办法:dpkg: 错误: 无法打开软件包的 info 文件 /var/lib/dpkg/available 以便读取: 没有那个文件或目录
解决办法:dpkg: 错误: 无法打开软件包的 info 文件 /var/lib/dpkg/available 以便读取: 没有那个文件或目录
405 0
|
4月前
|
Shell
记录使用sh命令打包安装文件成为.run格式的安装包--run安装包打包--sh打包run
记录使用sh命令打包安装文件成为.run格式的安装包--run安装包打包--sh打包run
40 0
|
5月前
|
资源调度
pnpm : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\pnpm.ps1,因为在此系统上禁止运行脚本。
pnpm : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\pnpm.ps1,因为在此系统上禁止运行脚本。
构建freeswitch, make cd-moh-install提示文件错误
构建freeswitch, make cd-moh-install提示文件错误
92 0
构建freeswitch, make cd-moh-install下载不了文件怎么办?
构建freeswitch, make cd-moh-install下载不了文件怎么办?
64 0
|
SQL 分布式计算 Hadoop
Nautilus无法创建下列所需的文件夹:/home/user/Desktop 报错解决
Nautilus无法创建下列所需的文件夹:/home/user/Desktop 报错解决
146 0
|
Python
pip安装报错:No such file or directory ; 没有那个文件或目录
pip安装报错:No such file or directory ; 没有那个文件或目录
934 2
|
资源调度
PowerShell yarn : 无法加载文件 C:\Users\Admin\AppData\Roaming\npm\yarn.ps1,因为在此系统因为在此系统上禁止运行脚本。
PowerShell yarn : 无法加载文件 C:\Users\Admin\AppData\Roaming\npm\yarn.ps1,因为在此系统因为在此系统上禁止运行脚本。
181 0
PowerShell yarn : 无法加载文件 C:\Users\Admin\AppData\Roaming\npm\yarn.ps1,因为在此系统因为在此系统上禁止运行脚本。