#!/usr/bin/env bash

if [ -d MD9600_firmware/application/source/linkerdata ]; then
    if [ -e MD9600_firmware/tools/codec_cleaner.Linux -a -x MD9600_firmware/tools/codec_cleaner.Linux ]; then
	cd MD9600_firmware/application/source/linkerdata && ../../../tools/codec_cleaner.Linux -C
    else
	echo "Error: The required tools are not installed in MD9600_firmware/tools, the process cannot be completed."
	exit 1
    fi
else
	echo "Error: Your source tree is incomplete, please fix this."
	exit 1
fi

exit 0
