lsp.orig 486 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. # this is a test script and is NOT ready to be used with ait
  3. # Set the file to watch
  4. opts_file="/tmp/.ait_lsp_options"
  5. # Get the initial modification time
  6. init_time=$(stat -f %m "$opts_file")
  7. echo "$@" > /tmp/.ait_lsp_cmd
  8. while true; do
  9. cur_time=$(stat -f %m "$opts_file")
  10. if [ "$cur_time" != "$init_time" ]; then
  11. obj=`cat $opts_file | pick | awk -F'\t' '{print $2}'`
  12. lua %%SHAREDIR%%/lsp-extract.lua "$obj"
  13. break
  14. fi
  15. sleep 1
  16. done