Prevent InvocationError on non-existent files

exit code for the function will be 1 if the previous command failed
if/then condition intercepts that

Change-Id: Icf43e72c65e6c63d95aef8d289b689a200d1eaeb
This commit is contained in:
Frank Kloeker 2019-04-21 00:09:37 +02:00
parent 83e72eef86
commit d63035e13d

View File

@ -112,10 +112,13 @@ function add_language_index_to_original {
function recover_rst_files {
for f in `find $DIRECTORY/source -name '*.rst'`; do
[ -f $f.backup ] && mv $f.backup $f
if [ -f $f.backup ]; then
mv $f.backup $f
fi
done
}
function remove_pot_files {
# remove newly created pot files
rm -f ${DIRECTORY}/source/locale/*.pot