changeset 1:44d6d3cb28a0

fix:CreathgRepos.sh Delete Chinese and use English
author Pluto <meokcin@gmail.com>
date Tue, 03 Sep 2024 16:38:26 +0800
parents edd512324c03
children c8c80b5286b1
files Mercurial/CreathgRepos.sh
diffstat 1 files changed, 7 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/Mercurial/CreathgRepos.sh	Tue Sep 03 16:30:52 2024 +0800
+++ b/Mercurial/CreathgRepos.sh	Tue Sep 03 16:38:26 2024 +0800
@@ -1,42 +1,34 @@
 #!/bin/bash
 
-# 提示用户输入仓库名称
-echo "请输入仓库名称(不要中文):"
+echo "Please enter the repository name (not in Chinese):"
 read repo_name
 
-# 创建仓库目录
 repo_path="/var/hg/$repo_name"
 mkdir -p "$repo_path"
 
-# 检查目录是否创建成功
 if [ ! -d "$repo_path" ]; then
-    echo "目录创建失败,请检查权限或磁盘空间。"
+    echo "Directory creation failed, please check permissions or disk space."
     exit 1
 fi
 
-# 初始化Mercurial仓库
 hg init "$repo_path"
 
-# 更改仓库所有者为www-data
 sudo chown -R www-data:www-data "$repo_path"
 
-# 更改仓库权限为755
+
 sudo chmod -R 755 "$repo_path"
 
-# 提示用户输入description和contact的内容
-echo "请输入description的内容:"
+echo "Please enter the description :"
 read description
-echo "请输入contact的内容:"
+echo "Please enter the contact :"
 read contact
 
-# 构建hgrc文件内容
 hgrc_content="[web]
 description = $description
 contact = $contact"
 
-# 写入.hg/hgrc文件
 hgrc_path="$repo_path/.hg/hgrc"
 echo "$hgrc_content" | sudo tee "$hgrc_path" > /dev/null
 
-echo "仓库已成功创建并配置在 $repo_path"
-echo "hgrc文件已更新。"
\ No newline at end of file
+echo "New repositoryinitialized successfully in $repo_path"
+echo "The hgrc file has been updated."
\ No newline at end of file
备案号:苏ICP备2024087954号-2 | 渝公网安备50010402001513