diff --git a/Jenkinsfile b/Jenkinsfile index bc36534..6230f17 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,10 +32,22 @@ pipeline { stages { stage('Download GCC toolchain') { + when { + expression { + def process = "${GCC_TARGET}-gcc".execute() + + if process.exitValue() > 0 { + return false + } else { + return true + } + } + } steps { sh "wget ${TOOLCHAIN_URL}" sh 'mkdir ' + GCC_TARGET + '-cross' sh 'tar -x -z -f ' + GCC_TARGET + '-cross.tgz' + sh 'rm -vf ${GCC_TARGET}-cross.tgz' } }