if [ -f $SOPC_KIT_NIOS2/nios2_sdk_shell_bashrc ]
then
. "$QUARTUS_ROOTDIR/sopc_builder/bin/nios_bash"
fi
if [ -f $SOPC_KIT_NIOS2/nios2_sdk_shell_bashrc ]
then
cmd="nios2-download DE2_SD_Card_Audio.elf -c USB-Blaster[USB-0] -r -g"
else
cmd=""$SOPC_KIT_NIOS2/nios2_command_shell.sh" nios2-download DE2_SD_Card_Audio.elf -c USB-Blaster[USB-0] -r -g"
fi
$cmd || {
    echo "download failed"
    exit 1
}
if [ -f $SOPC_KIT_NIOS2/nios2_sdk_shell_bashrc ]
then
rm -f nios_down_ng.txt
else
"$SOPC_KIT_NIOS2/nios2_command_shell.sh" rm -f nios_down_ng.txt
fi
exit 0



