#! /usr/bin/env bash # file : build/run-if-arg # copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file # Run command if there are any non-empty arguments. # # $1 command to execute # $2 argument to test cmd=$1 shift if [ "$*" ]; then exec $cmd $* fi