]> gitweb.morketsmerke.org Git - idle.git/commitdiff
Dodanie wyraźnych oznaczeń separujących wyjście z poszczególnych kontenerów w funkcja...
authorxf0r3m <jakubstasinski@protonmail.com>
Wed, 9 Aug 2023 10:56:47 +0000 (12:56 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Wed, 9 Aug 2023 10:56:47 +0000 (12:56 +0200)
idle-clis

index 3e698f3f711170d02cf2ccf14f3000c95c17cefa..4b475146a05357d0e06769c4fe347358aac9b5f8 100755 (executable)
--- 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 <distro_name> - bring up the shell of given distro";
+  echo "  check-commmand <distro_name> <command> - verify is given command exists in given distro";
+  echo "  apropos <distro_name> <keywords> - finds commmands match to given keywords";
+  echo "  pkgsearch <distro_name> <package> - check is given package is ready to install in given distro";
+  echo;
+  echo "<distro_name> - pointing only one distro, but use also:"
+  echo "  <group>:";
+  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