Only hardlink files from cache_dir if it exists
When setup_workspace is being run on a system without a cached dir it will fail when find is ran on the non-existent dir. This can happen when running running reproduce.sh from a gate job on a blank vm. Change-Id: I69795848cd0b95f7d377af7463042562a84e2b8a
This commit is contained in:
parent
a0cf5e926c
commit
903f1a6bc6
|
@ -517,8 +517,10 @@ function setup_workspace {
|
|||
rm -rf ~/cache/files/
|
||||
fi
|
||||
|
||||
# copy them to where devstack expects with hardlinks to save space
|
||||
find $cache_dir -mindepth 1 -maxdepth 1 -exec cp -l {} $DEST/devstack/files/ \;
|
||||
if [ -d $cache_dir ]; then
|
||||
# copy them to where devstack expects with hardlinks to save space
|
||||
find $cache_dir -mindepth 1 -maxdepth 1 -exec cp -l {} $DEST/devstack/files/ \;
|
||||
fi
|
||||
|
||||
# Disable detailed logging as we return to the main script
|
||||
$xtrace
|
||||
|
|
Loading…
Reference in New Issue