2013-01-04 11:24:45 +01:00
|
|
|
unison_exe="/usr/bin/unison"
|
|
|
|
tmp_file=$(mktemp)
|
|
|
|
|
2013-09-04 17:14:18 +02:00
|
|
|
for profile in $@;
|
|
|
|
do
|
2018-05-24 13:47:44 +02:00
|
|
|
res="$(${unison_exe} -batch $profile > ${tmp_file} 2>&1)"
|
2013-09-04 17:14:18 +02:00
|
|
|
file_sync=$?
|
|
|
|
|
2018-05-24 13:47:44 +02:00
|
|
|
if [ "$file_sync" -ne "0" ];
|
2013-09-04 17:14:18 +02:00
|
|
|
then
|
2018-05-24 13:47:44 +02:00
|
|
|
echo "return code $file_sync"
|
|
|
|
more ${tmp_file}
|
2013-09-04 17:14:18 +02:00
|
|
|
fi
|
|
|
|
done
|
2015-02-26 14:25:54 +01:00
|
|
|
|
|
|
|
rm $tmp_file
|