PHP Classes

File: support/tools/.common.sh

Recommend this page to a friend!
  Classes of Daniele Orlando   FluidXML   support/tools/.common.sh   Download  
File: support/tools/.common.sh
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: FluidXML
Manipulate XML documents using a fluent interface
Author: By
Last change:
Date: 8 years ago
Size: 799 bytes
 

Contents

Class file image Download
set -o errexit set -o nounset chkcmd() { if command -v "$1" > /dev/null 2>&1; then return 0 fi return 1 } watch() { if ! chkcmd 'fswatch'; then echo ' error: "fswatch" command not found.' exit 1 fi fswatch --latency 0.1 --print0 "$@" } dsstore_filter() { while read -d '' e; do local dsstore=$(echo "$e" | grep -o "\.DS_Store") ## We don't use the exit status, because an exit status different from 0 terminates the script. ## Checking the output should be better than setting set +o errexit and then set -o errexit. if test "$dsstore" != '.DS_Store'; then echo "$e\0" fi done }