On Thu, Dec 24, 2020 at 11:18:52AM +0800, Cao Xueliang wrote:
On Thu, Dec 24, 2020 at 10:18:37AM +0800, Wang Chenglong wrote:
Signed-off-by: Wang Chenglong 18509160991@163.com
container/docker-rootfs/setup-image | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/container/docker-rootfs/setup-image b/container/docker-rootfs/setup-image index 787a42c..ffe4937 100755 --- a/container/docker-rootfs/setup-image +++ b/container/docker-rootfs/setup-image @@ -4,8 +4,15 @@
install_packages() {
- yum install -y --skip-broken $(</tmp/packages-to-install)
- yum clean all
- if [ $(command -v yum) >/dev/null ]; then
Use has_cmd ?
Good.
Thanks, Chenglong
Thanks, Xueliang
yum install -y --skip-broken $(</tmp/packages-to-install)
yum clean all
- elif [ $(command -v apt-get) >/dev/null ]; then
apt update
apt-get install -y --fix-missing $(</tmp/packages-to-install)
- elif [ $(command -v pacman) >/dev/null ]; then
pacman -Syu --noconfirm $(</tmp/packages-to-install)
- fi
}
remove_file()
2.23.0