aboutsummaryrefslogblamecommitdiff
path: root/lint/bin.sh
blob: d27494ddb224ddbbb891e6afc514a06c81fad90f (plain) (tree)
1
2
3
4
5
6
7
          
      
                        
                            
    
                                    
                                                   




                                         
                                  

                                        
                                                       
    
                                                         
  
# POSIX sh
set --
for bin in bin/*.sh ; do
    set -- "$@" "${bin%.sh}"
done
shellcheck -e SC1090 -- "$@" || exit
printf 'POSIX sh binscripts linted successfully.\n'

# GNU Bash
if command -v bash >/dev/null 2>&1 ; then
    set --
    for bin in bin/*.bash ; do
        set -- "$@" "${bin%.bash}"
    done
    shellcheck -e SC1090 -- "$@" || exit
    printf 'GNU Bash binscripts linted successfully.\n'
else
    printf 'bash(1) not found, skipping GNU Bash lint.\n'
fi