Files
rk35xx-android14/external/obstack/post_update.sh
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

22 lines
505 B
Bash
Executable File

#!/bin/bash -x
# $1 Path to the new version.
# $2 Path to the old version.
# We only want a few files from the archive, so delete any files that weren't
# in the old version. Start with deleting whole directories first.
find $1 -maxdepth 1 -type d -printf "%P\n" | while read f; do
if [ ! -d "$2/$f" ]; then
rm -rf $1/$f
fi
done
find $1 -printf "%P\n" | while read f; do
if [ ! -e "$2/$f" ]; then
rm -rf $1/$f
fi
done
# Copy over the android directory
cp -r $2/android $1/android