mirror of
https://github.com/Evolution-X-Devices/vendor_google_walleye
synced 2026-01-27 14:21:05 +00:00
* And subsequent modifications taken from * repo: https://github.com/TheMuppets/proprietary_vendor_google * branch: lineage-19.1 * as of: a434787e0f1855e6e6df58301669b0b6d8dd3d61 Change-Id: Ia82b29ab0af3ef51e8f42b6b3ff79fae4e072978
30 lines
817 B
Bash
Executable File
30 lines
817 B
Bash
Executable File
#!/system/bin/sh
|
|
|
|
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
|
|
dest_path=$DEST_PATH/"${i#$SRC_PATH/}"
|
|
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"
|
|
done
|
|
fi
|
|
done
|
|
restorecon -R "$DEST_PATH"
|
|
echo 1 > "$FILES_MOVED"
|
|
fi
|