#!/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