no message

This commit is contained in:
hellcat 2025-04-14 13:48:19 +08:00
parent b770ba1bb5
commit 1a45beae51
2 changed files with 18 additions and 6 deletions

View File

@ -84,9 +84,9 @@ class CronController
echo "Output from init.sh:\n$output\n";
$output = shell_exec("git config --global --add safe.directory $sUserProjectDir 2>&1");
echo "<br>Output from --add safa.directory:\n$output\n";
// $output = shell_exec("git config --global --add safe.directory $sUserProjectDir 2>&1");
//
// echo "<br>Output from --add safa.directory:\n$output\n";
}
// 写入内容

View File

@ -1,10 +1,22 @@
#!/bin/bash
cd $1
# 检查是否提供了目录参数
if [ -z "$1" ]; then
echo "请提供要操作的目录."
exit 1
fi
# 进入指定目录
cd "$1" || { echo "无法进入目录 $1"; exit 1; }
# 添加安全目录
git config --global --add safe.directory "$1"
# 添加所有更改
git add .
# 提交更改,使用当前日期作为提交信息
git commit -m "$(date)"
git push origin main # 确保将 'main' 替换为你的默认分支名称
# 推送到远程仓库,确保将 'main' 替换为你的默认分支名称
git push origin main # 或者使用你的默认分支名称