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 + 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()
problem in your subject: Subject: Re: [PATCH v5 compass-ci] docker-rootf: add different install methods
^-- rootfs
-------- Thanks Yu Chuan
On Thu, Dec 24, 2020 at 09:39:40AM +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
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
On Thu, Dec 24, 2020 at 10:06:18AM +0800, Yu Chuan wrote:
problem in your subject: Subject: Re: [PATCH v5 compass-ci] docker-rootf: add different install methods
^-- rootfs
ok. got it.
Good.
Thanks, Chenglong
Thanks Yu Chuan
On Thu, Dec 24, 2020 at 09:39:40AM +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
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