#!/bin/bash set -e; case "$1" in url) if [[ -f "/home/git/$2/VHOST" ]]; then echo "http://$(< "/home/git/$2/VHOST")" else cat fi ;; help) cat && cat< Show the URL for an application EOF ;; esac cat