From: xf0r3m Date: Wed, 9 Aug 2023 10:56:47 +0000 (+0200) Subject: Dodanie wyraźnych oznaczeń separujących wyjście z poszczególnych kontenerów w funkcja... X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=8ecbfe9da4bb7d3825082c04e4a6fb1e2bbeb524;p=idle.git Dodanie wyraźnych oznaczeń separujących wyjście z poszczególnych kontenerów w funkcjach ckpackage i ckapropos, dodanie komunikatu pomocy i jego wywołania --- 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