#!/bin/bash
echo $1 $2 $3
pwd
libDir=linux
modeDir=Debug
if echo $3|grep -E "Android"; then
libDir=android
fi
if echo $3|grep -E "Release"; then
modeDir=Release
echo "mode: $modeDir"
echo "mode: $libDir"
if [ ! -d "lib" ]; then
mkdir "lib"
if [ ! -d "lib/linux" ]; then
mkdir "lib/linux"
if [ ! -d "lib/android" ]; then
mkdir "lib/android"
if [ ! -d "lib/linux/Debug" ]; then
mkdir "lib/linux/Debug"
if [ ! -d "lib/linux/Release" ]; then
mkdir "lib/linux/Release"
if [ ! -d "lib/android/Debug" ]; then
mkdir "lib/android/Debug"
if [ ! -d "lib/android/Release" ]; then
mkdir "lib/android/Release"
test -e ../$3/lib$1.so&& cp ../$3/lib$1.so ../../../lib/$libDir/$modeDir/lib$2.so