diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-18 17:47:48 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-18 17:47:48 +0100 |
commit | 62da7699529b57f3bf851ec9258da89be42094dc (patch) | |
tree | ea3753fae66baeb9f992adbff50df8568540314c /utils/lib.sh | |
parent | d2cfe9ce5bb409472f10590aa1ae069b2a971a49 (diff) | |
download | searxng-62da7699529b57f3bf851ec9258da89be42094dc.tar.gz searxng-62da7699529b57f3bf851ec9258da89be42094dc.zip |
./utils/lxc.sh: add command 'install base'
to install basic packages like git and *build essentials*::
$ ./utils/lxc.sh install base
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/lib.sh')
-rwxr-xr-x | utils/lib.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/lib.sh b/utils/lib.sh index e9bfc929f..50f15a690 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -1090,6 +1090,28 @@ touch "/.lxcenv" ls -l "/.lxcenv" EOF } + +# apt packages +LXC_BASE_PACKAGES_debian="git build-essential" + +# pacman packages +LXC_BASE_PACKAGES_arch="git base-devel" + +# dnf packages +LXC_BASE_PACKAGES_fedora="git @development-tools" + +case $DIST_ID in + ubuntu|debian) LXC_BASE_PACKAGES="${LXC_BASE_PACKAGES_debian}" ;; + arch) LXC_BASE_PACKAGES="${LXC_BASE_PACKAGES_arch}" ;; + fedora) LXC_BASE_PACKAGES="${LXC_BASE_PACKAGES_fedora}" ;; + *) err_msg "$DIST_ID-$DIST_VERS: pkg_install LXC_BASE_PACKAGES not yet implemented" ;; +esac + +lxc_install_base_packages() { + info_msg "install LXC_BASE_PACKAGES in container $1" + pkg_install "${LXC_BASE_PACKAGES}" +} + lxc_exists(){ # usage: lxc_exists <name> || echo "container <name> does not exists" |