#!/bin/sh ##################################################################### VIM_ARGS=(-p) BUILD_PREFERENCE=( /usr/local/bin/vim # source build /usr/bin/vim # package manager build ) for V in ${BUILD_PREFERENCE[@]} do [ -f $V ] && VIM=$V && break done [ -f $VIM ] || { echo "unable to find a build for vim; is it installed?" >&2 exit 1 } ##################################################################### exec $VIM ${VIM_ARGS[@]} "$@"