A terminal client for the Mattermost chat system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run.sh 632B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. # Run the most recently-modified matterhorn binary in the matterhorn
  3. # working tree.
  4. #
  5. # Portability: Linux, OS X
  6. set -e
  7. HERE=$(cd `dirname $0`; pwd)
  8. # Portability note: -executable is only compatible with GNU find but
  9. # this invocation should be more portable.
  10. OPTIONS=$(find $HERE/dist-newstyle -name matterhorn -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \) )
  11. SORTED=$(ls -t ${OPTIONS})
  12. # Run the most recently-modified binary that we found. Note that since
  13. # we use exec, this loop never makes it past one iteration.
  14. for OPTION in ${SORTED}; do
  15. exec "${OPTION}" ${1+$@}
  16. done
  17. echo "No executables found."