script: unison echo message only on errors
This commit is contained in:
parent
62b4c4eaa5
commit
f75d291791
@ -3,13 +3,13 @@ tmp_file=$(mktemp)
|
||||
|
||||
for profile in $@;
|
||||
do
|
||||
res=$(${unison_exe} -batch $profile > ${tmp_file} 2>&1)
|
||||
grep "Nothing to do: replicas have not changed since last sync" ${tmp_file} > /dev/null
|
||||
res="$(${unison_exe} -batch $profile > ${tmp_file} 2>&1)"
|
||||
file_sync=$?
|
||||
|
||||
if [ ! $file_sync == 0 ];
|
||||
if [ "$file_sync" -ne "0" ];
|
||||
then
|
||||
echo $(more ${tmp_file})
|
||||
echo "return code $file_sync"
|
||||
more ${tmp_file}
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user