Add a workaround for the lack of -mmin in Solarises find, check for
gfind from opencsw and failing that use perl, which Solaris ships with
and is widely available on many other systems.
If neither a working find nor perl is available, print a warning and
turn off remote status checking.
Use eval in async_run to run the command, the old bash in Solaris 5.10
does not recognize the previous syntax.
Use command -v instead of which to check for the existance of rbenv in
the Crunch and Solarized_Extravagant themes. command -v is the POSIX-ly
correct way to check for the existance of a command, and which does not
set the exit code on Solaris.
echo"[1;31mWARNING[0m: neither a find that supports -mmin (such as GNU find) or perl is available, disabling remote status checking. Install GNU find as gfind or perl to enable this feature, or set GIT_PROMPT_FETCH_REMOTE_STATUS=0 to disable this warning." >&2
echo >&2
GIT_PROMPT_FETCH_REMOTE_STATUS=0
return1
fi
}
function checkUpstream(){
function checkUpstream(){
local GIT_PROMPT_FETCH_TIMEOUT
local GIT_PROMPT_FETCH_TIMEOUT
git_prompt_config
git_prompt_config
localFETCH_HEAD="$repo/.git/FETCH_HEAD"
localFETCH_HEAD="$repo/.git/FETCH_HEAD"
# Fech repo if local is stale for more than $GIT_FETCH_TIMEOUT minutes
# Fech repo if local is stale for more than $GIT_FETCH_TIMEOUT minutes