Ai
4 Star 8 Fork 4

爱折腾智能机器人/commands

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sync_private.sh 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
################################################################
# Function :Back up private directories and scripts to a fixed location
# Platform :All Linux Based Platform
# desc :备份私有目录和脚本到固定的位置
# Version :1.0
# Date :2023-09-09
# Author :ncnynl
# Contact :1043931@qq.com
# Company :Foshan AiZheTeng Information Technology Co.,Ltd.
# URL: https://ncnynl.com
################################################################
source ${HOME}/commands/cs_utils.sh
function sync_private()
{
#if exists ?
if [ ! -d ~/tools/commands_private ]; then
mkdir -p ~/tools/commands_private
fi
hint "Begin to sync file to commands_private!!"
# keep _dir
rsync -azv ~/tools/commands/commands_extra/_* ~/tools/commands_private/
rsync -azv --include="_*/shell/.description" ~/tools/commands/commands_extra/_* ~/tools/commands_private/
# keep dir/_*.sh
rsync -azv --delete --prune-empty-dirs --include='*/' --include='_*.sh' --exclude='*' ~/tools/commands/commands_extra/ ~/tools/commands_private/
hint "Done!! Please submit to repo"
}
sync_private $*
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/ncnynl/commands.git
git@gitee.com:ncnynl/commands.git
ncnynl
commands
commands
master

搜索帮助