Merge "Change move_widevine_data.sh to move L3 files" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-24 20:59:31 +00:00
committed by Android (Google) Code Review

View File

@@ -3,6 +3,7 @@
DEST_PATH="/data/vendor/mediadrm"
FILES_MOVED="/data/vendor/mediadrm/files_moved"
SRC_PATH="/data/mediadrm"
L3_FILE_PATTERN="ay64.dat*"
if [ ! -f "$FILES_MOVED" ]; then
for i in "$SRC_PATH/IDM"*; do
@@ -10,6 +11,13 @@ if [ ! -f "$FILES_MOVED" ]; then
if [ -d "$i" ]; then
mkdir -p $dest_path -m 700
mv $i "$DEST_PATH"
for file in ${dest_path}/${L3_FILE_PATTERN}; do
[ -e "${file}" ] || continue
# We need to move any L3 files in the IDM folder to the L3 subfolder.
l3_dir="${dest_path}/L3/"
mkdir -p "${l3_dir}" -m 700
mv "${file}" "${l3_dir}"
done
find $dest_path -print0 | while IFS= read -r -d '' file
do
chgrp media "$file"