BBCONFDIR=${INSTALL_ROOT}/etc/bashburn/
BBCONFFILE=${BBCONFDIR}bashburnrc
BBINSTALL_PATH="${INSTALL_ROOT}/usr/share/BashBurn"

#message "Installing BashBurn into ${BBINSTALL_PATH}"

# Change the paths in the config file and the main script file
sed -i "s:BBCONFFILE=/etc/bashburnrc:BBCONFFILE=/etc/bashburn/bashburnrc:" BashBurn.sh &&
sed -i "s:BBROOTDIR\:.*:BBROOTDIR\: ${BBINSTALL_PATH}:g" bashburnrc					&&

# Does the path already exist ?
if [[ ! -e "${BBINSTALL_PATH}" ]]; then
	mkdir ${BBINSTALL_PATH}
fi													&&

# Copying files
cp -Rfp {burning,config,convert,menus,misc,lang,BashBurn.sh} ${BBINSTALL_PATH}				&&

# Create symlink
ln -sf ${BBINSTALL_PATH}/BashBurn.sh /usr/bin/bashburn
