mirror of
https://github.com/Evolution-X-Devices/device_google_gs201
synced 2026-01-27 14:29:33 +00:00
gs201: convert_to_ext4: copy .files, fix md5sum
Copy files in persist/.* Don't leave md5sums file in the persist folder. Bug: 239632964 Signed-off-by: Andrew Chant <achant@google.com> Change-Id: I7d351806f95ccc28fcfec4d45ecf3bda488e7e15
This commit is contained in:
committed by
Konstantin Vyshetsky
parent
83e0b84caf
commit
b108713200
@@ -109,6 +109,7 @@ while [[ $RETRIES -gt 0 ]]; do
|
||||
continue
|
||||
fi
|
||||
|
||||
cp -rp $MNT_OLD/.* $MNT_NEW/
|
||||
cp -rp $MNT_OLD/* $MNT_NEW/
|
||||
check_success "cp -rp $MNT_OLD/* $MNT_NEW/"
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -120,11 +121,12 @@ while [[ $RETRIES -gt 0 ]]; do
|
||||
fi
|
||||
|
||||
# Calculate md5sum of all files and compare between persist and efs
|
||||
(cd $MNT_NEW; find . -type f | xargs md5sum | sort) > $MNT_NEW/md5sums
|
||||
(cd $MNT_OLD; find . -type f | xargs md5sum | sort) > $MNT_OLD/md5sums
|
||||
diff -q $MNT_NEW/md5sums $MNT_OLD/md5sums
|
||||
check_success "diff -q $MNT_NEW/md5sums $MNT_OLD/md5sums"
|
||||
(cd $MNT_NEW; find . -type f | xargs md5sum | sort) > $MNT_BASE/new.md5sums
|
||||
(cd $MNT_OLD; find . -type f | xargs md5sum | sort) > $MNT_BASE/old.md5sums
|
||||
diff $MNT_BASE/new.md5sums $MNT_BASE/old.md5sums
|
||||
check_success "diff $MNT_BASE/new.md5sums $MNT_BASE/old.md5sums"
|
||||
RES=$?
|
||||
rm $MNT_BASE/new.md5sums $MNT_BASE/old.md5sums
|
||||
|
||||
umount $MNT_NEW
|
||||
umount $MNT_OLD
|
||||
|
||||
Reference in New Issue
Block a user