rwxrob-dot/scripts/haschanged
Rob Muhlestein 2ea0289e9f Rebase
2022-02-09 02:29:05 -05:00

14 lines
284 B
Bash
Executable File

#!/usr/bin/env bash
## Returns the number of changed files in the current directory or any
## subdirectories recursively. Useful for detecting changes and taking
## action (see changed).
haschanged () {
local -a files
files=($(changed))
return ${#files[@]}
}
haschanged "$@"