Skip to content
Snippets Groups Projects
validate-install-command.sh 278 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/bash
    
    RES=0
    
    for dockerfile in "$@"; do
        if grep "apt-get install\|yum install" "$dockerfile"; then
            echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|yum -y install ...'" >&2
            RES=1
        fi
    done
    
    exit $RES