#!/bin/sh

echo "Recovery license @#"

if [ $# -lt 2 ]; then
    echo "error: need 2 args!"
    exit -1
fi

from_path=$1
to_path=$2

if [ ! -d ${from_path} ]; then
    echo "error: from path is not exist!"
    exit -1
fi

if [ ! -d ${to_path} ]; then
    mkdir -p ${to_path}
    echo "dir is not exit,mkdir it!"
fi

rm -rf ${to_path}
cp -a ${from_path} ${to_path} || exit -1

echo "Recovery livense end!"
