1 Star 2 Fork 0

ggdxwz/packages

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
install 984 Bytes
一键复制 编辑 原始数据 按行查看 历史
ggdxwz 提交于 2021-08-14 15:59 . update install.
#!/bin/bash
declare -i version
url="https://gitee.com/ggdxwz/packages/raw/master/"
version=$(dpkg -l openmediavault | awk '$2 == "openmediavault" { print substr($3,1,1) }')
echo ${version}
if [ ${version} -lt 4 ]; then
echo "Unsupported version of openmediavault"
exit 0
fi
list="/etc/apt/sources.list.d/omvextras.list"
if [ -f "${list}" ]; then
rm ${list}
fi
echo "Downloading omv-extras.org plugin for openmediavault ${version}.x ..."
file="openmediavault-omvextrasorg_latest_all${version}.deb"
echo "Updating repos before installing..."
apt-get update
echo "Install prerequisites..."
apt-get --yes --no-install-recommends install dirmngr gnupg
if [ -f "${file}" ]; then
rm ${file}
fi
wget ${url}/${file}
if [ -f "${file}" ]; then
dpkg -i ${file}
if [ $? -gt 0 ]; then
echo "Installing other dependencies ..."
apt-get -f install
fi
echo "Updating repos ..."
apt-get update
else
echo "There was a problem downloading the package."
fi
exit 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ggdxwz/packages.git
git@gitee.com:ggdxwz/packages.git
ggdxwz
packages
packages
master

搜索帮助