Fixed argument to head in pull.sh
[org-fireforg.git] / ff_mac_workaround / pull.sh
blobbffd3a9418731e951eabd1a9e48b8ccc7e60201c
1 #!/bin/bash
4 EMACS_CLIENT=emacsclient
5 TMP_FILE=~/.org-fireforg-mac.tmp
7 while [ 0==0 ]
8 do
10 # Read the first line
11 COM=$(head -n 1 ${TMP_FILE})
13 if [ "${COM}" != "" ]; then
14 # echo "Calling ${EMACS_CLIENT} with argument: ${COM}"
15 # read
16 ${EMACS_CLIENT} "${COM}"
18 # Remove the first line
19 perl -pi -e '$_ = "" if ($. == 1);' ${TMP_FILE}
21 else
22 sleep 1s
25 done