diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-02-06 20:05:49 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-02-06 20:05:49 +0000 |
commit | 674f899fdd1912d12914df3c85b6d0ae2ca661ba (patch) | |
tree | ca8c24267acc6b9ea8203ec37d0ee8e6328eac5a | |
parent | 73f316d804abff4cfbe45bf01aa4c81c2450ff2f (diff) | |
parent | e49f05028ce9082e46fc0d257ffd0cd53b4a5a78 (diff) | |
download | ironic-python-agent-674f899fdd1912d12914df3c85b6d0ae2ca661ba.tar.gz |
Merge "[TinyIPA] Avoid running rm with no parameters"
-rwxr-xr-x | imagebuild/tinyipa/finalise-tinyipa.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/imagebuild/tinyipa/finalise-tinyipa.sh b/imagebuild/tinyipa/finalise-tinyipa.sh index 459723a4..64dc8ecd 100755 --- a/imagebuild/tinyipa/finalise-tinyipa.sh +++ b/imagebuild/tinyipa/finalise-tinyipa.sh @@ -158,14 +158,14 @@ if $PYOPTIMIZE_TINYIPA; then set +e $CHROOT_CMD /bin/bash -c "python -OO -m compileall /usr/local/lib/python2.7" set -e - find $FINALDIR/usr/local/lib/python2.7 -name "*.py" -not -path "*ironic_python_agent/api/config.py" | sudo xargs rm - find $FINALDIR/usr/local/lib/python2.7 -name "*.pyc" | sudo xargs rm + find $FINALDIR/usr/local/lib/python2.7 -name "*.py" -not -path "*ironic_python_agent/api/config.py" | sudo xargs --no-run-if-empty rm + find $FINALDIR/usr/local/lib/python2.7 -name "*.pyc" | sudo xargs --no-run-if-empty rm else sudo sed -i "s/PYTHONOPTIMIZE=1/PYTHONOPTIMIZE=0/" "$FINALDIR/opt/bootlocal.sh" fi # Delete unnecessary Babel .dat files -find $FINALDIR -path "*babel/locale-data/*.dat" -not -path "*en_US*" | sudo xargs rm +find $FINALDIR -path "*babel/locale-data/*.dat" -not -path "*en_US*" | sudo xargs --no-run-if-empty rm # Allow an extension to be added to the generated files by specifying # $BRANCH_PATH e.g. export BRANCH_PATH=master results in tinyipa-master.gz etc |