Merge "Shell quoting in move_widevine_data.sh"

This commit is contained in:
TreeHugger Robot
2021-02-03 05:29:45 +00:00
committed by Android (Google) Code Review

View File

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