我尝试运行以下步骤,但它不执行“if”步骤(第 5 行和第 6 行)(我很确定它们应该因为测试的目录不存在,我尝试了多种格式的 bash if,但他们都失败了。有没有办法测试一个条件而不是我正在使用的那个?
- step:
name: Google Cloud SDK Installation
caches:
- pip
- cloudsdk
script:
- export ENV=dev
- source scripts/setenv.sh
- export CLOUDSDK_CORE_DISABLE_PROMPTS=1
- SDK_FILENAME=google-cloud-sdk-$SDK_VERSION-linux-x86_64.tar.gz
- if [ ! -e ${HOME}/google-cloud-sdk ] ; then `curl -O -J https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${SDK_FILENAME}`; fi
- if [ ! -e ${HOME}/google-cloud-sdk ] ; then `tar -zxvf ${SDK_FILENAME} --directory ${HOME}`; fi
- export PATH=${PATH}:${HOME}/google-cloud-sdk/bin
- GAE_PYTHONPATH=${HOME}/google_appengine
- export PYTHONPATH=${PYTHONPATH}:${GAE_PYTHONPATH}
- python scripts/fetch_gae_sdk.py $(dirname "${GAE_PYTHONPATH}")