#!/bin/bash # generate Teamocil (gem install ...) session comprising selected components # jpokorny@redhat.com (will be pleased to know about further enhancements) # licensed under GPLv2+ (note: this file only, not the bundled helper) COMPONENTS="$@" if [ $# -eq 0 ]; then echo "Usage: $0 [comp]* [-]" exit elif [ ${@: -1} = '-' ]; then while read c; do COMPONENTS+=" ${c}" done fi cat <<-EOF session: name: "bz" windows: EOF for c in $(echo ${COMPONENTS} | tr ' ' '\n' | sort); do cat <<-EOF - name: "${c}" panes: - cmd: "watch-bz ${c}" EOF done