Files
android_bootable_recovery/prebuilt/relink.sh
bigbiff ad58e1bfae repack: move sbin to /system ramdisk and update repacking
for android-10

This will support updating the ramdisk to a different
compression format and co-exist with magisk.

We are also cleaning up and removing non android-10
api makefile actions.

We are also moving twrp repacking to its own class. We
check the new ramdisk format and if it's different
we have magisk compress using the new ramdisk format.

Change-Id: I770030aae7797e75817178b2f0fccd9f39dc23af
2020-09-08 10:08:33 -04:00

26 lines
316 B
Bash
Executable File

#!/bin/bash
process_file()
{
dst=$1/$(basename $2)
src=$2
[[ -e $src ]] || return 0
if [ $dst == $src ]; then
cp -f -p $src $src.tmp
src=$2.tmp
fi
cp $src $dst
if [[ -e $2.tmp ]]; then rm -f $2.tmp; fi
}
dest=$1
shift 1
for ARG in $*
do
process_file $dest $ARG
done