Skip to content

Commit 9ba4d38

Browse files
committed
* [maixcam2] optimize packaging script
1 parent bab89e0 commit 9ba4d38

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tools/os/maixcam2/update_img.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,15 @@ if [ ! -f "$delete_first_files" ]; then
5757
exit 1
5858
fi
5959

60-
echo "Umounting raw rootfs"
61-
umount tmp2/rootfs
62-
if [ $? -ne 0 ]; then
63-
echo "Failed to unmount tmp2/rootfs"
64-
exit 2
60+
if [ -f tmp2/rootfs ];then
61+
echo "Umounting raw rootfs"
62+
umount tmp2/rootfs
63+
if [ $? -ne 0 ]; then
64+
echo "Failed to unmount tmp2/rootfs"
65+
exit 2
66+
fi
6567
fi
68+
6669
rm -rf tmp2/*
6770
mkdir -p tmp2
6871
chmod 777 tmp2

0 commit comments

Comments
 (0)