开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1995)
标签 (17)
master
zbs-volume-encryption@@3
codex/ceph-kvm-no-rbd-cli@@2
5.5.28
shixin-ZSTAC-86613-zstack-utility
dev/encrypted-volume-backup-linked-encryption@@4
5.4.10
feature-5.5.28-aios
4.8.38-Elitery
feature-5.5.28-alinux-arm-greatedb
zsv_5.1.0
4.8.38
cube_2.4.38_zs_4.8.38
shixin-ZSTAC-86553-5.5.28
shixin-ZSTAC-86527@@3
cherry-pick-f2005541
cherry-pick-c0c46473
feature-zsv-5.1.0-encryption
fix/ZSTAC-85748-bridge-route-snapshot-5.5.28
codex/fix-sblk-convert-encryption-size
4.4.45-kylin-release
3.1.3_release
2.0.1
2.0.0-rc1
2017年05月15日-rebase-devstage
2.0-feature-freeze
v0.01
1.0.2
1.0
0.9
0.8
0.7.1
0.7
0.7.0-iscsi
0.6.2
0.6.1
0.6
master
分支 (1995)
标签 (17)
master
zbs-volume-encryption@@3
codex/ceph-kvm-no-rbd-cli@@2
5.5.28
shixin-ZSTAC-86613-zstack-utility
dev/encrypted-volume-backup-linked-encryption@@4
5.4.10
feature-5.5.28-aios
4.8.38-Elitery
feature-5.5.28-alinux-arm-greatedb
zsv_5.1.0
4.8.38
cube_2.4.38_zs_4.8.38
shixin-ZSTAC-86553-5.5.28
shixin-ZSTAC-86527@@3
cherry-pick-f2005541
cherry-pick-c0c46473
feature-zsv-5.1.0-encryption
fix/ZSTAC-85748-bridge-route-snapshot-5.5.28
codex/fix-sblk-convert-encryption-size
4.4.45-kylin-release
3.1.3_release
2.0.1
2.0.0-rc1
2017年05月15日-rebase-devstage
2.0-feature-freeze
v0.01
1.0.2
1.0
0.9
0.8
0.7.1
0.7
0.7.0-iscsi
0.6.2
0.6.1
0.6
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1995)
标签 (17)
master
zbs-volume-encryption@@3
codex/ceph-kvm-no-rbd-cli@@2
5.5.28
shixin-ZSTAC-86613-zstack-utility
dev/encrypted-volume-backup-linked-encryption@@4
5.4.10
feature-5.5.28-aios
4.8.38-Elitery
feature-5.5.28-alinux-arm-greatedb
zsv_5.1.0
4.8.38
cube_2.4.38_zs_4.8.38
shixin-ZSTAC-86553-5.5.28
shixin-ZSTAC-86527@@3
cherry-pick-f2005541
cherry-pick-c0c46473
feature-zsv-5.1.0-encryption
fix/ZSTAC-85748-bridge-route-snapshot-5.5.28
codex/fix-sblk-convert-encryption-size
4.4.45-kylin-release
3.1.3_release
2.0.1
2.0.0-rc1
2017年05月15日-rebase-devstage
2.0-feature-freeze
v0.01
1.0.2
1.0
0.9
0.8
0.7.1
0.7
0.7.0-iscsi
0.6.2
0.6.1
0.6
zstack-utility
/
autoconf
zstack-utility
/
autoconf
autoconf 5.90 KB
一键复制 编辑 原始数据 按行查看 历史
Wei Wang 提交于 2021年12月14日 13:49 +08:00 . [zstackctl]: Add ps info to host-info for log collect
#!/bin/bash
SCRIPT_NAME=0ドル
zprint(){
if test x`uname` = x"Darwin"; then
echo -e $@
else
echo -e $@
fi
}
vercomp(){
# returns: 1ドル > 2ドル: return 0
# 2ドル < 1ドル: return 1
# 1ドル = 2ドル: return 2
echo -e 'test' | grep -- '-e' > /dev/null
not_suuport_e=$?
if [[ $not_support_e = 0 ]]; then
echo "1ドル\n2ドル" | sort --version-sort | head -n1 | grep 2ドル > /dev/null
first_larger=$?
echo "1ドル\n2ドル" | sort --version-sort | head -n1 | grep 1ドル > /dev/null
second_larger=$?
else
echo -e "1ドル\n2ドル" | sort --version-sort | head -n1 | grep 2ドル > /dev/null
first_larger=$?
echo -e "1ドル\n2ドル" | sort --version-sort | head -n1 | grep 1ドル > /dev/null
second_larger=$?
fi
if [[ $first_larger = 0 ]]; then
if [[ $second_larger = 0 ]]; then
return 2
else
return 0
fi
fi
return 1
}
gitconfig(){
bold=$(tput bold)
normal=$(tput sgr0)
if test x2ドル = x; then
zprint "0円33[33mplease specify sub-command: init|clear|search\n0円33[0m"
zprint "search which branches have commits related to ZSTACK-43023: "
zprint "0円33[34m./$SCRIPT_NAME.sh git search ZSTACK-43023 0円33[0m"
zprint "\nwill fetch remote by default, you can add --no-update to avoid update, like: "
zprint "0円33[34m./$SCRIPT_NAME.sh git search ZSTACK-43023 --no-update 0円33[0m"
zprint "\ninit git config(commit msg template and hook): just type:"
zprint "0円33[34m./$SCRIPT_NAME.sh git init 0円33[0m"
zprint "\nclear git config(commit msg template and hook): just type:"
zprint "0円33[34m./$SCRIPT_NAME.sh git clear 0円33[0m"
exit 1
elif test x2ドル = x'search'; then
update="y"
if test x3ドル = x; then
zprint "0円33[33mplease input commit message you want to search\n0円33[0m"
zprint "search which branches have commits related to ZSTACK-43023: "
zprint "0円33[34m./runMavenProfile git search ZSTACK-43023 0円33[0m"
zprint "\nwill fetch remote by default, you can add --no-update to avoid update, like: "
zprint "0円33[34m./runMavenProfile git search ZSTACK-43023 --no-update 0円33[0m"
exit 1
fi
if test x4ドル = x"--no-update"; then
update="n"
fi
zprint "============================"
if test x$update = x'y'; then
zprint "updating repo zstack-utility ..."
timeout 20 git fetch --all > /dev/null 2>&1
fi
zprint "searching in repo zstack-utility ..."
zprint "============================"
sha1s=`git log --oneline --all --grep "3ドル" | cut -d" " -f1 | tr '\n' ' '`
if test x`echo $sha1s|tr -d ' '` = x''; then
zprint "0円33[33mcan not find any related commits in repo zstack-utility0円33[0m"
else
zprint "\n0円33[32mfind commits 0円33[34m$sha1s0円33[0mrelated to 0円33[34m3ドル0円33[0m 0円33[0m"
for sha1 in $sha1s; do
br=`git branch --remote --contains $sha1 | grep -Eo '/[1-5]\.[0-9]+\.[0-9]+.*' | grep -Eo '[1-5].[0-9]+.[0-9]+.*' | grep -v '/'`
zprint "\n0円33[32mrelase branches with commit 0円33[34m$sha10円33[0m:0円33[0m \n${bold}$br${normal}"
done
fi
elif test x2ドル = x'init'; then
init_git_config
elif test x2ドル = x'clear'; then
clear_git_config
else
zprint "0円33[31mnot support ${bold}\"2ドル\"${normal}0円33[31myet0円33[0m"
fi
}
init_git_config() {
git config --global commit.verbose true
message_path=$(git rev-parse --show-toplevel)/.gitconfig/gitmessage
hook_dir=$(git rev-parse --show-toplevel)/.gitconfig/hooks
if [ ! -f $message_path ]; then
zprint "0円33[33mERROR: can not find git message template at $message_path0円33[0m"
fi
if [ ! -d $hook_dir ]; then
zprint "0円33[33mERROR: can not find git hook at $hook_dir0円33[0m"
fi
curr_git_ver=`git version | awk '{print 3ドル}'`
vercomp $curr_git_ver 2.9
support_config_hook=$?
if [ $support_config_hook -eq 1 ]; then
zprint "0円33[33mgit version older than 2.9, would replace git hook in .git rather than config hook path0円33[0m"
mv $(git rev-parse --show-toplevel)/.git/hooks/prepare-commit-msg $(git rev-parse --show-toplevel)/.git/hooks/prepare-commit-msg.bak.`date +%s` 2>/dev/null
mv $(git rev-parse --show-toplevel)/.git/hooks/commit-msg $(git rev-parse --show-toplevel)/.git/hooks/commit-msg.bak.`date +%s` 2>/dev/null
cp $(git rev-parse --show-toplevel)/.gitconfig/hooks/* $(git rev-parse --show-toplevel)/.git/hooks/
else
zprint "0円33[33mgit version newer than 2.9, would config hook path0円33[0m"
git config core.hooksPath $(git rev-parse --show-toplevel)/.gitconfig/hooks
fi
git config commit.template $(git rev-parse --show-toplevel)/.gitconfig/gitmessage
zprint "0円33[32mconfig git commit msg template and hook success!0円33[0m"
}
clear_git_config() {
curr_git_ver=`git version | awk '{print 3ドル}'`
vercomp $curr_git_ver 2.9
support_config_hook=$?
if [ $support_config_hook -eq 1 ]; then
rm $(git rev-parse --show-toplevel)/.git/hooks/prepare-commit-msg 2> /dev/null
rm $(git rev-parse --show-toplevel)/.git/hooks/commit-msg 2> /dev/null
else
git config --unset core.hooksPath
fi
git config --unset commit.template
zprint "0円33[32mclear git commit msg template and hook success!0円33[0m"
}
run_profile() {
if test x1ドル = x'git'; then
gitconfig $@
else
usage
fi
}
usage() {
zprint "0円33[33mplease specify sub-command, only support git for now0円33[0m\n"
zprint "for example: "
zprint "0円33[34m0ドル git0円33[0m"
}
if [ "$#" -eq 0 ]; then
zprint "0円33[33mno sub-command specified, init git config automatically...0円33[0m\n"
run_profile git init
exit
fi
if test x1ドル = x'help'; then
usage
fi
run_profile $@
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

暂无描述
暂无标签
Apache-2.0
使用 Apache-2.0 开源许可协议
, Apache-2.0
使用 Apache-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zstackio/zstack-utility.git
git@gitee.com:zstackio/zstack-utility.git
zstackio
zstack-utility
zstack-utility
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /