Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
シェルスクリプトからantスクリプトを実行する必要があり、antスクリプトが正常に実行された場合は、リターンコード0を取得する必要があります。失敗した場合は、1を取得する必要があります。
cd ~/yoursourcedir/ ant if [[ $? -ne 0 ]] then echo "error happend" fi
$?この場合、最後のコマンドのエラーコードが含まれていますant。 -ne 00に等しくないことを意味するため、エラーが発生した場合は、を実行しechoます。
$?
ant
-ne 0
echo
antに標準のパラメーター、つまりビルドファイルを指定できます。
ant -buildfile build.xml
アリの実行オプションの概要