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:
parent
83e72eef86
commit
d63035e13d
@ -112,10 +112,13 @@ function add_language_index_to_original {
|
|||||||
|
|
||||||
function recover_rst_files {
|
function recover_rst_files {
|
||||||
for f in `find $DIRECTORY/source -name '*.rst'`; do
|
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
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function remove_pot_files {
|
function remove_pot_files {
|
||||||
# remove newly created pot files
|
# remove newly created pot files
|
||||||
rm -f ${DIRECTORY}/source/locale/*.pot
|
rm -f ${DIRECTORY}/source/locale/*.pot
|
||||||
|
Loading…
Reference in New Issue
Block a user