So I just sat down and rewrote it, *properly* this time around, and it works like a blasted charm, in half the amount of code and a fraction of the execution time to boot. The only downside is between development and testing, I've spent several hours on it, and I've got to get up for work early tomorrow :-(. But hey, it's not like I could have gotten a decent nights sleep anyway.... and I would rather have something like this catch my focus, then leave my train of thought to it's usual ends.
neo is basically meant to replace updater.sh, but at the moment, I'm focused on replacing portversion—to make it worth using. Basically, I gave up on portupgrade and portmaster, and wrote a shell script that is more to my taste (updater.sh) some months ago. Using it is a simple thing:
# portversion -o | grep '<' | awk '{ print $1 }' > /tmp/pu && vi /tmp/pu # /home/Terry/updater.sh /tmp/pu
leaving me to manually select and sort the list before starting the upgrade. Now I could easily insert filters to handle that kind of stuff in a highly flexible way, but if we're gonna do that.... may as well ditch the portversion dependency, and that means ditching /bin/sh :'(. Making the current dilemma, converting the wacko zacko formats of version numbers, into something comparable in order to tell if it's up to date or not. Technically, a straight compare could be done, since it obviously isn't up to date unless it matches the version saved in the INDEX, but that precludes handling common edge cases.
No comments:
Post a Comment