0 Star 0 Fork 0

大地小神/vim

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
git-push-files 845 Bytes
一键复制 编辑 原始数据 按行查看 历史
qrsforever 提交于 2019-09-16 18:58 +08:00 . update
#!/bin/bash
files=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
count=0
for file in $files
do
dir=`dirname $file`
while [[ ${#dir} > 1 ]]
do
if [[ -d $dir/.git ]]
then
res=`git ls-files $file`
if [[ x$res == x ]]
then
git add $files
(( count += 1 ))
else
res=`git diff --name-only $files`
if [[ x$res != x ]]
then
git add $files
(( count += 1 ))
fi
fi
break
else
dir=`dirname $dir`
fi
done
done
if (( $count > 0 ))
then
dt=`date +"%Y-%m-%d %H:%M:%S"`
git commit -m "update: $dt"
git push
notify-send "git push success"
else
notify-send "no file need git push"
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lidongai/vim.git
git@gitee.com:lidongai/vim.git
lidongai
vim
vim
master

搜索帮助