Move if files exist
This commit is contained in:
parent
a68443cc8c
commit
1a3110b32c
|
@ -239,11 +239,27 @@ if [ ${#imgfiles[@]} -eq 0 ]; then
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv build/${PROJECT_NAME}*.bz2 ${CURR_DIR}
|
no_of_files=$(ls -afq build/${PROJECT_NAME}*.bz2 | wc -l)
|
||||||
mv build/${PROJECT_NAME}*.img ${CURR_DIR}
|
if (( no_of_files > 0 )); then
|
||||||
mv build/${PROJECT_NAME}*.sig ${CURR_DIR}
|
mv build/${PROJECT_NAME}*.bz2 ${CURR_DIR}
|
||||||
mv build/${PROJECT_NAME}*.vdi ${CURR_DIR}
|
fi
|
||||||
mv build/${PROJECT_NAME}*.qcow2 ${CURR_DIR}
|
no_of_files=$(ls -afq build/${PROJECT_NAME}*.img | wc -l)
|
||||||
|
if (( no_of_files > 0 )); then
|
||||||
|
mv build/${PROJECT_NAME}*.img ${CURR_DIR}
|
||||||
|
fi
|
||||||
|
no_of_files=$(ls -afq build/${PROJECT_NAME}*.sig | wc -l)
|
||||||
|
if (( no_of_files > 0 )); then
|
||||||
|
mv build/${PROJECT_NAME}*.sig ${CURR_DIR}
|
||||||
|
fi
|
||||||
|
no_of_files=$(ls -afq build/${PROJECT_NAME}*.vdi | wc -l)
|
||||||
|
if (( no_of_files > 0 )); then
|
||||||
|
mv build/${PROJECT_NAME}*.vdi ${CURR_DIR}
|
||||||
|
fi
|
||||||
|
no_of_files=$(ls -afq build/${PROJECT_NAME}*.qcow2 | wc -l)
|
||||||
|
if (( no_of_files > 0 )); then
|
||||||
|
mv build/${PROJECT_NAME}*.qcow2 ${CURR_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf ${BUILD_DIR}
|
rm -rf ${BUILD_DIR}
|
||||||
|
|
||||||
cd ${CURR_DIR}
|
cd ${CURR_DIR}
|
||||||
|
|
Loading…
Reference in New Issue