contacts-importer: Fix error checking
The current error code would never execute since the script runs with -e. So run each import with failure detection and report that at the end.
This commit is contained in:
parent
7906fefe11
commit
9530ebe594
|
@ -54,11 +54,13 @@ cd "$TEMP"
|
|||
|
||||
awk ' /BEGIN:VCARD/ { ++a; fn=sprintf("card_import_L5_%02d.vcf", a); print "Writing: ", fn } { print $0 >> fn; } ' "$FILE"
|
||||
|
||||
RET=0
|
||||
for f in "$TEMP"/card_import_L5*
|
||||
do syncevolution --import ${f%} backend=evolution-contacts database=${CONTACTDB}
|
||||
do
|
||||
syncevolution --import ${f%} backend=evolution-contacts database=${CONTACTDB} || RET=1
|
||||
done
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
if [ $RET -eq 0 ]
|
||||
then
|
||||
notify-send "Successful import";
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue