#!/bin/bash

config_dir="/usr/share/lve-tests/"
if [ ! -d "$config_dir" ]; then 
    mkdir -p $config_dir;
    [ $? -ne 0 ] && echo "Run script as root" && exit 1;
fi;

sed -r "s/confdir=\.\//confdir=\/usr\/bin\/lvectl_test/" lvectl_test.sh > /usr/bin/lvectl_test
install -m 0600 clean_ve_config /usr/share/lve-test/clean_ve_config
install -m 0600 apply_ve_config /usr/share/lve-test/apply_ve_config
install -m 0600 apply_create_ve_config /usr/share/lve-test/apply_create_ve_config
echo ok