diff --git a/xcopen b/xcopen new file mode 100755 index 0000000..7c07919 --- /dev/null +++ b/xcopen @@ -0,0 +1,16 @@ +#!/bin/bash +EXT='xcworkspace' +dir=$1 + +shopt -s nullglob + +found=0 +for i in $1/*.${EXT}; do + open -a Xcode "$i" + found=1 + break +done +[ $found -eq 0 ] && echo "No Xcode workspace found" + +shopt -u nullglob +