aboutsummaryrefslogtreecommitdiff
path: root/tools/validate-install-command.sh
blob: eff67d5cfef7121373789ad1d690832c3d011042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

RES=0

for dockerfile in "$@"; do
    if grep "apt-get install\|dnf install" "$dockerfile"; then
        echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|dnf -y install ...'" >&2
        RES=1
    fi
done

exit $RES