From 8ecbfe9da4bb7d3825082c04e4a6fb1e2bbeb524 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Wed, 9 Aug 2023 12:56:47 +0200 Subject: [PATCH] =?utf8?q?Dodanie=20wyra=C5=BAnych=20oznacze=C5=84=20separ?= =?utf8?q?uj=C4=85cych=20wyj=C5=9Bcie=20z=20poszczeg=C3=B3lnych=20kontener?= =?utf8?q?=C3=B3w=20w=20funkcjach=20ckpackage=20i=20ckapropos,=20dodanie?= =?utf8?q?=20komunikatu=20pomocy=20i=20jego=20wywo=C5=82ania?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- idle-clis | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/idle-clis b/idle-clis index 3e698f3..4b47514 100755 --- a/idle-clis +++ b/idle-clis @@ -40,13 +40,14 @@ function ckapropos() { containerName=$1; shift; keywords=$@; - echo "Output from: $containerName container..."; + echo -e "Output from: ${GREEN}$containerName${ENDCOLOR} container..."; idle-exec-command $containerName apropos $keywords; } function ckpackage() { containerName=$1; package=$2; + echo -e "Output from: ${GREEN}$containerName${ENDCOLOR}"; case $containerName in alpine) idle-exec-command $containerName "apk search $package";; archlinux) idle-exec-command $containerName "pacman -Ss $package";; @@ -58,6 +59,26 @@ function ckpackage() { esac } +function help() { + echo "idle-cli - InterDistribution Linux Environment CLI"; + echo "(receive command script)"; + echo "@ 2023 morketsmerke.org"; + echo; + echo "Options:"; + echo " list-distros - listing available containers with Linux distros on this server"; + echo " shell - bring up the shell of given distro"; + echo " check-commmand - verify is given command exists in given distro"; + echo " apropos - finds commmands match to given keywords"; + echo " pkgsearch - check is given package is ready to install in given distro"; + echo; + echo " - pointing only one distro, but use also:" + echo " :"; + echo " --deb - .deb packages using distros (debian,kali,ubuntu)"; + echo " --rpm - .rpm packages using distros (fedora,rocky,opensuse)"; + echo " --other - other distros don't match to above (alpine,archlinux,gentoo,void)"; + echo " or <--all> - all 10 available distros (warning, output could be large, use some of pager)"; +} + if [ $# -gt 0 ]; then source /usr/local/bin/idle; command=$1; @@ -78,5 +99,6 @@ if [ $# -gt 0 ]; then doInContainers $containerName ckpackage $@;; esac else + help; exit 1; fi -- 2.39.5