mirror of https://github.com/rwxrob/dot
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.
14 lines
284 B
Plaintext
14 lines
284 B
Plaintext
3 years ago
|
#!/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 "$@"
|