Archive for December, 2006

So many -Options

I’ve been trying to clean up the syntax for SINP and I’ve discovered that I needed to overhaul the way command line options were handled. I decided to have the -options set flags then use the other argument for searching/downloading. Hopefully this will give SINP greater flexibillity. Because of this I’ve got to overhaul how most of the functions work, but it will be worth it if SINP can have cleaner syntax. Usually this is the point where I start the project over from scratch, but that always leads to having a million copies of the same file lying around. Guess it’s time to learn how to properly maintain an application. 😉

Advertisements

December 30, 2006 at 12:33 am Leave a comment

SINP Update

I did some cleaning up of SINP last night, and the searching function is complete. You can now use SINP to search the slackbuilds.org by application name (default) or by the descriptions in the SlackBuild’s README and slack-desc file. Description searching takes a loooooong time mainly because wget hangs on every couple of files. It looks more like a server problem than with SINP. When SINP’s not stuck it usually reads the descriptions pretty fast. Unfortunately description searching sometimes gives false positives. For example if I’m searching for the word term, probably searching for some terminal application, returns stuff if term is found in any word in the description. (like determine)

Maybe this could be fixed by requiring a match in both the README and slack-desc files, or maybe I could just learn grep better. 😉

Also, in the future I’d like to be able to use more than one keyword for description searching, but for now I’m completely happy with my results and have submitted the project to sourceforge.net for review. So in a couple of days I should have a nice place to host SINP and a skeleton website up. 🙂

December 28, 2006 at 5:03 pm Leave a comment

SINP Is Not Portage

There was some interesting talk on the ##slackware channel about someone running a portage on Slackware. It’s a cool idea to think about, so I decided to rig up a script to integrate SlackBuilds from the slackbuilds.org project with Slack’s native package manager. The result is SINP. Unlike portage SINP is not a package manager. All it does is download SlackBuilds, run the SlackBuilds, and install the resulting package. And in true Slackware fashion it does not track dependencies. This means that there is no local database that you have to keep updated, and you don’t have to worry about a broken database that winds up corrupting everything. (as has been my luck with from source distros)

The script isn’t nearly as polished as it will be, but it gets the job done, and it needs to be run as root.

Usage:
./sinp -s something searches slackbuilds.org for whatever something is.
./sinp -d something downloads the SlackBuild tarball
./sinp -p tells sinp to actuall run the SlackBuild

and finally ./sinp -i full_path_to_package calls installpkg to install the new package

When using -d I recommend having the argument as (including the quotes) `./sinp -s whatever` because that’s the format the download function needs. FOR NOW

Also when using -i you need to put the full path to the tgz file. Again, something that will be cleaned up.

A full run (download, make package, install package) for supertux would look like ./sinp -d `./sinp -s supertux` -p -i /tmp/supertux*.tgz

When all the smoothing out is complete it should look like ./sinp -dpi supertux

I’d like to eventually host the project on a Slackware specific site, but sourceforge would be OK.

If you’d like to try it out the script is the first comment. Any feedback is welcome. 🙂

December 27, 2006 at 10:08 pm 4 comments

Duplicates: The Horror!!!

Through my own stupidity and lack of organization I have managed to duplicate a large mass of files over the years. These duplicates are scattered all over the place and aren’t guaranteed to be in the same directory from backup disk to backup disk. Also some of the backups are more recent backups so the files contents are somewhat different. Then there’s the horror of duplicate tree’s within duplicate trees from attempts to organize the mess! (not to mention duplicates that have been compressed and projects that have been duplicated to rework) There’s several gigs worth of data that I’d like to salvage in there! Surely someone has made a tool to deal with this type of situation. I’m currently trying some apps found on freshmeat.net to see if there’s anything at all to help.

I need something that can
find exact duplicated – md5 hash?
find similar duplicates and be able to view differences/merge contents- files that have been updated
and finally, files with the same name that have the same name, but are completely different
cross platform would be nice

Then I have my paper stacks to digitize, but I’ll save that for another day 😉

😛

December 27, 2006 at 2:27 am 4 comments

New Year’s Resolution: Use /tmp

For a lot of small scripting projects and everyday stuff I find myself redirecting the output of some command to a file (usually called tmp/tmp?) for different purposes. This is perfectly fine. I know that if I come across a file called tmp it’s usually safe to delete, but having a bunch of “tmp” files left lying around undeleted just adds to the clutter in my $HOME. (Not to mention all the wasted KB’s of hard disk space 😉 ) Then it occurred to me that the sole reason for /tmp’s existence is being a place to store temporary files. So this year one of my New Years resolutions is to keep all these “tmp” files in /tmp where they belong.

December 25, 2006 at 9:41 pm 2 comments

The watch Command

watch runs command repeatedly and updates the output on the screen. This is useful for monitoring the output of a command, like cat $LOGFILE, for changes. This allows for all sorts of scripting goodness. Guess that means I have another excuse to have an xterm open. 😉

December 24, 2006 at 10:23 pm 1 comment

CSS

It’s been a while since I’ve used CSS. For just about all my recent web pages I’ve relied on font tags and tables, and most probably weren’t valid HTML. (GASP!) It’s fun to watch the whole page magically update with a change in a single file.

December 24, 2006 at 7:22 pm Leave a comment

Older Posts


Feeds