echo"If the module1 is backing lib1 then the backedby.txt would contains: "
echo"lib1"
echo"lib1.so lib2.so"
}
contains(){
val="$1"
shift
for x in"$@";do
if["$x"="$val"];then
return 0
fi
done
return 1
}
genBackedByList(){
genAllBackedByList(){
out="$1"
shift
ndk_list="$1"
shift
rm-f"$out"
touch"$out"
while IFS=read-r line
do
soFileName=$(echo"$line" | sed's/\(.*so\).*/\1/')
if[[!-z"$soFileName"&&"$soFileName"!=*"#"*]]
then
if contains "$soFileName""$@";then
echo"$soFileName">>"$out"
fi
fi
done < "$ndk_list"
echo"$@">>"$out"
}
if[["$1"=="help"]]
then
printHelp
elif[["$#"-lt2]]
elif[["$#"-lt1]]
then
echo"Wrong argument length. Expecting at least 2 argument representing output path, path to ndk library list, followed by a list of libraries in the Mainline module."
echo"Wrong argument length. Expecting at least 1 argument representing output path, followed by a list of libraries in the Mainline module."