Se o arquivo existir e for um arquivo normal.
sua afirmação em inglês:
Se o arquivo "/ bin / post_compile" existir e for um arquivo normal, então:
- Imprimir mensagem
- Tornar o arquivo executável
- Execute o arquivo usando
sub-env
end if ( fi )
Eu tenho uma declaração if em um arquivo bash:
if [ -f bin/post_compile ]; then
echo "-----> Running post-compile hook"
chmod +x bin/post_compile
sub-env bin/post_compile
fi
o que significa o -f ?
Se o arquivo existir e for um arquivo normal.
sua afirmação em inglês:
Se o arquivo "/ bin / post_compile" existir e for um arquivo normal, então:
sub-env
end if ( fi )
Tags bash