YES="\u2714";
NO="\u2716";
+function doInContainers() {
+ containerName=$1;
+ fn=$2;
+ shift 2;
+ if [ "$containerName" = "--all" ]; then
+ containerList=$(idle-list-containers | awk '{printf $1" "}' | sed 's/://g');
+ for containerName in $containerList; do
+ $fn $containerName $2;
+ done
+ else
+ $fn $containerName $2;
+ fi
+}
+
function ckcmd() {
cmd=$2;
idle-exec-command $1 $cmd > /dev/null 2>&1;
fi
}
+
if [ $# -gt 0 ]; then
source /usr/local/bin/idle;
command=$1;
"shell") idle-exec-shell $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;;
+ doInContainers $containerName ckcmd $@;
+ exit;;
"apropos") idle-apropos $@; exit;;
"pkgsearch") idle-pkg-search $@; break;;
esac