Monday, 9 December 2013

Fixing avahi-advertise in Preparation of my 0.3 Release

This post is part of my ongoing project to create an Avahi configuration package for Pidora Linux. My last post detailed my 0.2 release.

This post will detail my bug fixes and optimizations to the avahi-advertise command I released last week. I did not have much time to test my command before I released it so I found some bugs.

They primarily dealt with not using the right variables in the right places. I also forgot to tell getopts to look for some the options I said the command supported. These were quickly found and fixed.

The other change I made to my program was to remove a lot of the unnecessary logic and replace it with a semi-modular subroutine. Now, whenever a service option is entered, the txtadd subroutine will substitute the service name into the correct areas of the code. This reduced the size of the program by more than 50%!

The final change I made was to change the script header from bash to sh to have the system recognize the command as a command.

The next portion of my project will detail my packaging and install of the avahi-advertise command. The new version of avahi-advertise in the form of an rpm will be my 0.3 release.

0 comments :

Post a Comment