From: xf0r3m Date: Mon, 7 Aug 2023 17:59:33 +0000 (+0200) Subject: Poprawienie ścieżki wskazującej na główną bibliotekę. Uruchomienie opcji 'check-comma... X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=60408eec63565012c41924574528dd102e4e5093;p=idle.git Poprawienie ścieżki wskazującej na główną bibliotekę. Uruchomienie opcji 'check-command' - skrypt odbioru poleceń CLI - idle-clis.sh --- diff --git a/idle-clis b/idle-clis old mode 100644 new mode 100755 index 90c200f..5632132 --- a/idle-clis +++ b/idle-clis @@ -1,13 +1,37 @@ #!/bin/bash +RED="\e[31m"; +GREEN="\e[32m"; +ENDCOLOR="\e[0m"; +YES="\u2714"; +NO="\u2716"; + +function ckcmd() { + cmd=$2; + idle-exec-command $1 $cmd > /dev/null 2>&1; + if [ $? -eq 0 ]; then echo -e "${1}: $2 ${GREEN}${YES}${ENDCOLOR}"; + else echo -e "${1}: $2 ${RED}${NO}${ENDCOLOR}"; + fi +} + if [ $# -gt 0 ]; then - source /usr/share/local/idle; + source /usr/local/bin/idle; command=$1; shift; case $command in "list-distros") idle-list-containers; break;; "shell") idle-exec-shell $2; exit;; - "check-command") idle-exec-command $2; exit;; + "check-command") + containerName=$1; + if [ "$containerName" = "--all" ]; then + containerList=$(idle-list-containers | awk '{printf $1" "}' | sed 's/://g'); + for containerName in $containerList; do + ckcmd $containerName $2; + done + else + ckcmd $containerName $2; + fi + exit;; "apropos") idle-apropos $@; exit;; "pkgsearch") idle-pkg-search $@; break;; esac