1 Star 0 Fork 21

woerwin/ShellManageSoftware

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
manage.sh 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
zhangtianjie 提交于 2018-11-04 23:29 . 转移本地项目到 Github
#!/bin/bash
###############
# Name: 软件管理脚本
# Params 1: <AliasSoftware> 软件别名
# Params 2: <AliasCommand> 软件命令
# Params 3: <AliasConfig> 配置别名
# author: ZhangTianJie
# email: ztj1993@gmail.com
###############
### 定义帮助文本
if [ "${1}" == "help" ] || [ "${1}" == "" ]; then
echo ">>> params 1 <AliasSoftware>"
echo ">>> params 2 <AliasCommand>[install|init|backup|supervisor|systemd]"
echo ">>> params 3 <AliasConfig>"
exit
fi
### 环境定义
ProjectPathRoot=$(cd $(dirname $(readlink -f ${BASH_SOURCE[0]})) && pwd)
ProjectPathBackup=${ProjectPathRoot}/Backup
ProjectPathBin=${ProjectPathRoot}/Bin
ProjectPathCustom=${ProjectPathRoot}/Custom
ProjectPathPackage=${ProjectPathRoot}/Package
ProjectPathPlugin=${ProjectPathRoot}/Plugin
ProjectPathShell=${ProjectPathRoot}/Shell
### 引入通用脚本
source ${ProjectPathShell}/CommonShell/Function.sh
### 定义别名变量
AliasSoftware=${1}
AliasCommand=${2}
AliasConfig=${3:-default}
AliasSoftwareMain=$(getStringArrayItem "${1}" "." "0")
AliasSoftwareSub=$(getStringArrayItem "${1}" "." "1")
### 引入管理脚本
source ${ProjectPathShell}/Manage/Variables.sh
source ${ProjectPathShell}/Manage/ExecFlow.sh
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/woerwin/ShellManageSoftware.git
git@gitee.com:woerwin/ShellManageSoftware.git
woerwin
ShellManageSoftware
ShellManageSoftware
master

搜索帮助