completion/gradle: use `_command_exists`
parent
0ad1af8306
commit
679d8b10b6
|
|
@ -58,9 +58,9 @@ __gradle-set-cache-name() {
|
|||
|
||||
__gradle-set-files-checksum() {
|
||||
# Cache MD5 sum of all Gradle scripts and modified timestamps
|
||||
if builtin command -v md5 > /dev/null; then
|
||||
if _command_exists md5; then
|
||||
gradle_files_checksum=$(md5 -q -s "$(cat "$cache_dir/$cache_name" | xargs ls -o 2>/dev/null)")
|
||||
elif builtin command -v md5sum > /dev/null; then
|
||||
elif _command_exists md5sum; then
|
||||
gradle_files_checksum=$(cat "$cache_dir/$cache_name" | xargs ls -o 2>/dev/null | md5sum | awk '{print $1}')
|
||||
else
|
||||
echo "Cannot generate completions as neither md5 nor md5sum exist on \$PATH"
|
||||
|
|
|
|||
Loading…
Reference in New Issue