#!/bin/sh
user_path=/home/$USER
local_share_path="$user_path"/.local/share/protrainup/LiveTagPRO
exec_path="$local_share_path/run"
icon_path="$local_share_path/icon.png"

echo "LiveTagPRO will be installed into $local_share_path"

read -p "Enter \"y\" to continue: " yn

case $yn in
	y ) echo;;
	* ) exit 1;;
esac

script_path=$(dirname -- "$0")

mkdir -p $local_share_path

cp -vR "$script_path"/* "$local_share_path/"

echo "Creating .desktop start file"

desktop-file-install --dir=$HOME/.local/share/applications --set-icon="$icon_path" --set-key="Exec" --set-value="$exec_path" LiveTagPRO.desktop

echo "Done! Run LiveTagPRO using your launcher."
