hack/verify-all.sh: turn tab into space

This commit is contained in:
Eric Paris 2015-09-23 16:34:38 -04:00
parent de38de0c1a
commit 1ef9e05341

View File

@ -24,59 +24,61 @@ source "${KUBE_ROOT}/cluster/kube-env.sh"
SILENT=true SILENT=true
function is-excluded { function is-excluded {
for e in $EXCLUDE; do for e in $EXCLUDE; do
if [[ $1 -ef ${BASH_SOURCE} ]]; then if [[ $1 -ef ${BASH_SOURCE} ]]; then
return return
fi fi
if [[ $1 -ef "$KUBE_ROOT/hack/$e" ]]; then if [[ $1 -ef "$KUBE_ROOT/hack/$e" ]]; then
return return
fi fi
done done
return 1 return 1
} }
while getopts ":v" opt; do while getopts ":v" opt; do
case $opt in case $opt in
v) v)
SILENT=false SILENT=false
;; ;;
\?) \?)
echo "Invalid flag: -$OPTARG" >&2 echo "Invalid flag: -$OPTARG" >&2
exit 1 exit 1
;; ;;
esac esac
done done
if $SILENT ; then if $SILENT ; then
echo "Running in the silent mode, run with -v if you want to see script logs." echo "Running in the silent mode, run with -v if you want to see script logs."
fi fi
EXCLUDE="verify-godeps.sh" EXCLUDE="verify-godeps.sh"
for t in `ls $KUBE_ROOT/hack/verify-*.sh` for t in `ls $KUBE_ROOT/hack/verify-*.sh`
do do
if is-excluded $t ; then if is-excluded $t ; then
echo "Skipping $t" echo "Skipping $t"
continue continue
fi fi
if $SILENT ; then if $SILENT ; then
echo -e "Verifying $t" echo -e "Verifying $t"
bash "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}" bash "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}"
else else
bash "$t" || true bash "$t" || true
fi fi
done done
for t in `ls $KUBE_ROOT/hack/verify-*.py` for t in `ls $KUBE_ROOT/hack/verify-*.py`
do do
if is-excluded $t ; then if is-excluded $t ; then
echo "Skipping $t" echo "Skipping $t"
continue continue
fi fi
if $SILENT ; then if $SILENT ; then
echo -e "Verifying $t" echo -e "Verifying $t"
python "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}" python "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}"
else else
python "$t" || true python "$t" || true
fi fi
done done
# ex: ts=2 sw=2 et filetype=sh