Fixed error message when temporary file for mac workaround doesn't exist.
[org-fireforg.git] / ff_mac_workaround / pull.sh
blob92ccb0018f8d78ee14711e6f00b99bbcf7061e06
1 #!/bin/bash
4 EMACS_CLIENT=emacsclient
5 TMP_FILE=~/.org-fireforg-mac.tmp
7 while [ 0==0 ]
8 do
10 if [ -f "${TMP_FILE}" ]; then
11 # Read the first line
12 COM=$(head -n 1 ${TMP_FILE})
14 if [ "${COM}" != "" ]; then
15 # echo "Calling ${EMACS_CLIENT} with argument: ${COM}"
16 # read
17 ${EMACS_CLIENT} "${COM}"
19 # Remove the first line
20 perl -pi -e '$_ = "" if ($. == 1);' ${TMP_FILE}
24 else
25 sleep 1s
28 done