Skip to content

Commit d7de36d

Browse files
committed
tecff-firmware-distribution: improve error handling
1 parent 883e959 commit d7de36d

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

‎tecff-firmware-distribution‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,25 @@ sleep 5
5151
# ssh copy
5252
echo "starting ssh copy... (needs ssh agent redirection)"
5353
rsync -rltv --delete $SRC/images/factory/ $SRVSSH_USR@$SRVSSH:/$SRVSSH_PATH/$SRVSSH_DIR/$BRANCH/factory/
54+
if [ $? -ne 0 ]; then
55+
echo "rsync of factory images failed. aborting."
56+
exit 1
57+
fi
5458
rsync -rltv --delete $SRC/images/sysupgrade/ $SRVSSH_USR@$SRVSSH:/$SRVSSH_PATH/$SRVSSH_DIR/$BRANCH/sysupgrade/
59+
if [ $? -ne 0 ]; then
60+
echo "rsync of sysupgrade images failed. aborting."
61+
exit 1
62+
fi
5563
if [ -d "$SRC/images/other/" ]; then
5664
rsync -rltv --delete $SRC/images/other/ $SRVSSH_USR@$SRVSSH:/$SRVSSH_PATH/$SRVSSH_DIR/$BRANCH/other/
65+
if [ $? -ne 0 ]; then
66+
echo "rsync of other images failed. aborting."
67+
exit 1
68+
fi
5769
fi
5870
rsync -rltv $SRC/packages/ $SRVSSH_USR@$SRVSSH:/$SRVSSH_PATH/modules/
59-
71+
if [ $? -ne 0 ]; then
72+
echo "there was an error during rsync of packages/modules".
73+
exit 1
74+
fi
6075
echo "finished."

0 commit comments

Comments
 (0)