#!/usr/bin/env bash

# Functions for data definition

copy_link_data()
{
	cd ${BBBURNDIR}
	echo $bb_dc_explain1
	echo "$bb_dc_explain2a${BBBURNDIR}$bb_dc_explain2b"
	echo $bb_dc_explain3
	echo $bb_dc_explain4
	echo $bb_dc_explain5
	echo $bb_dc_explain6
	echo $bb_dc_explain7
	echo $bb_dc_explain8
	bash
}

view_contents()
{
	if [ $(ls ${BBBURNDIR} | wc -l) == 0 ]; then
  		echo "$bb_dc_ch3_4 ${BBBURNDIR}"
	else
  		ls -lhgGL --color ${BBBURNDIR}
	fi
}

delete_data()
{
	if [ $(ls ${BBBURNDIR} | wc -l) == 0 ]; then
  		echo "$bb_dc_ch3_4 ${BBBURNDIR}"
	else
  		ls -lhgGL --color ${BBBURNDIR}
		echo; echo -n $bb_dc_ch3_1
		while true; do
			read choice
			if [[ "$choice" = "y" ]]; then
				rm -rf ${BBBURNDIR}/*
				echo; echo $bb_dc_ch3_2
				break
			else
				echo; echo $bb_dc_ch3_3
				break
			fi
		done
	fi
}

show_data_size()
{
	if [ $(ls -l ${BBBURNDIR} | grep -v total | wc -l) -gt 0 ]; then
  		echo -n "${BBBURNDIR} : "
		echo $(du -shL ${BBBURNDIR}) | cut -d ' ' -f 1; echo
	fi
}

