You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rwxrob-dot/scripts/haschanged

14 lines
284 B
Bash

#!/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 "$@"