加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/VSCodium/vscodium
克隆/下载
utils.sh 444 Bytes
一键复制 编辑 原始数据 按行查看 历史
Zac 提交于 2023-07-21 09:45 . refactor: passing linter on all bash scripts
#!/usr/bin/env bash
# All common functions can be added to this file
exists() { type -t "$1" &> /dev/null; }
is_gnu_sed () {
sed --version &> /dev/null
}
replace () {
echo "${1}"
if is_gnu_sed; then
sed -i -E "${1}" "${2}"
else
sed -i '' -E "${1}" "${2}"
fi
}
if ! exists gsed; then
if is_gnu_sed; then
function gsed() {
sed -i -E "$@"
}
else
function gsed() {
sed -i '' -E "$@"
}
fi
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化