Friday, March 20, 2015

Cerberus Alpha: File Format Problem and Small Update

I've been busy at work so it's been a while since the last update so I wanted to make a quick post. I've made a little more progress and handled the lettercase issue, but I'll talk about that in the next one. I was going back and forth through so many different editors that I made the mistake of saving a new version directly from Notepad on Windows. That caused some "file not found" errors when trying to run the program, although "ls" and "cat" could find the file fine. I opened it in nano and tried a few things. I didn't notice at first, but nano was saying something about MS-DOS mode, it was an easy to miss message. I found this little command very helpful:

head -1 yourscript | od -c

It would out put

0000000 # ! / b i n / b a s h \r \n

if the format was not correct and

0000000 # ! / b i n / b a s h \n
if the format was correct. As you can see, there was an invisible trailing carriage return after #!/bin/bash that was causing the issue. Apparently due to the MS-DOS text format. Following that there was a simple dos2unix command installed on my system that magically took care of the problem. I don't know if dos2unix is on TinyCore (was using Parted Magic at the time), but if it isn't I may include it. Although, best practice would be to use caution with your file formats because the problem is not immediately obvious.

Anyway, next time I'll talk about the lettercase fix that I made in 1.5 among other things. Hopefully the project will be complete in the next couple weeks!

Here are some screenshots of the main menu:

And Cerberus Alpha's "title screen." Enter 'a' at the main menu.

No comments:

Post a Comment