Merge pull request #20 from vimist/More_tools

More tools
This commit is contained in:
Kunal Dabir 2017-10-14 16:18:02 +05:30 committed by GitHub
commit f6fe16c659
1 changed files with 8 additions and 1 deletions

9
has
View File

@ -75,11 +75,13 @@ __detect(){
grunt|brunch) __dynamic_detect--version ${command} ;;
ruby|gem|rake|bundle) __dynamic_detect--version ${command} ;;
python|python3) __dynamic_detect--version ${command} ;;
perl|php) __dynamic_detect--version ${command} ;;
perl|php|php5) __dynamic_detect--version ${command} ;;
groovy|gradle|mvn) __dynamic_detect--version ${command} ;;
lein) __dynamic_detect--version ${command} ;;
# commands that need -version flag
ant|java|javac) __dynamic_detect-version ${command} ;;
scala) __dynamic_detect-version ${command} ;;
# commands that need version arg
hugo) __dynamic_detect-arg_version ${command} ;;
@ -109,6 +111,11 @@ __detect(){
if [ $? -eq 1 ]; then status=0; else status=1; fi
;;
sbt)
version=$(sbt about 2>&1 | egrep -o "([[:digit:]]{1,4}\.){2}[[:digit:]]{1,4}" | head -1)
status=$?
;;
*)
## Can allow dynamic checking here, i.e. checking commands that are not listed above
if [[ "${HAS_ALLOW_UNSAFE}" == "y" ]]; then