exynos-linux-stable/scripts/replace_dir.sh
FAROVITUS 2b92eefa41 import G965FXXU7DTAA OSRC
*First release for Android (Q).

Signed-off-by: FAROVITUS <farovitus@gmail.com>
2020-02-04 13:50:09 +02:00

24 lines
370 B
Bash

#!/bin/sh
# Support selinux version
# replace_directory dst src
DST="$1/$2"
SRC="$1/$3"
if [ "x${DST}" == "x${SRC}" ]
then
#echo "${DST} and ${SRC} is same"
exit 0
else
if [ -d ${SRC} ]
then
if [ -L ${DST} ] || [ -d ${DST} ]
then
rm -rf ${DST}
fi
ln -s $(basename ${SRC}) ${DST}
else
echo "${SRC} does not exit"
exit -1
fi
fi