As sycamorex said, please don't use color tags to print the code. It's almost impossible to read that color. Please put [code][/code] tags around it instead.
"Unexpected end of file" usually means that you forgot to put the proper closing on a command string. That is, you're missing a closing quote-mark, bracket, or loop ender like "done", "esac", or "fi". The shell keeps looking until it finds an appropriate closing mark, or it reaches the end of the file. In quotes especially, there's sometimes a cascading effect, as it steps from quote to quote off-and-on until the last one mismatches.
I don't see anything in the above like that, and it imports just fine for me. But since it does source /etc/bashrc and /etc/profile, you'll need to look there as well.
As an aside, I see the HISTIGNORE variable has the "[ \t]*:&:" trick to ignore duplicates and entries starting with spaces. But you can now set a separate HISTCONTROL variable to control that behavior. It even allows a new value, "erasedups", to remove the previous history entries, so that the commands you enter stay near the top of the stack. Check it out in the bash man page.