1 Star 0 Fork 0

孤海飞雁/AspNetCore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
clean.sh 943 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
set -euo pipefail
#
# Functions
#
__usage() {
echo "Usage: $(basename "${BASH_SOURCE[0]}") <Arguments>
Arguments:
<Arguments>... Arguments passed to the 'git' command. Any number of arguments allowed.
Description:
This script cleans the repository interactively, leaving downloaded infrastructure untouched.
Clean operation is interactive to avoid losing new but unstaged files. Press 'c' then [Enter]
to perform the proposed deletions.
"
}
git_args=()
while [[ $# -gt 0 ]]; do
case $1 in
-\?|-h|--help)
__usage
exit 0
;;
*)
git_args[${#git_args[*]}]="$1"
;;
esac
shift
done
# This incantation avoids unbound variable issues if git_args is empty
# https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u
git clean -dix -e .dotnet/ -e .tools/ ${git_args[@]+"${git_args[@]}"}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liujian1368928/AspNetCore.git
git@gitee.com:liujian1368928/AspNetCore.git
liujian1368928
AspNetCore
AspNetCore
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385