bash category archive

30 October 2007

Subversion (SVN) GNOME Nautilus Script Helpers

Update, 3 November 2007:

Found a better solution: Jason Field’s NautilusSvn. More SVN features, much better integration with Nautilus, and uses emblems to show file and directory status. There is a .deb file that installed easily on my Ubuntu 7.04/Feisty Fawn machine. And it’s free as in GPL v2. Thanks, Jason!

Use NautilusSvn instead of my meager scripts!

Update, 6 November 2007:

I wrote another post about NautilusSvn and replacement emblems.

Update, 22 February 2008:

Jason’s site has been down today. Acting as a backup, here are the files I downloaded back in November:

nautilussvn_0.9-1.deb (25 KB)
NautilusSvn_v0.9.tar.gz (25 KB)

Hopefully jasonfield.com will be back soon and then I recommend going there for the latest and greatest.

Extend the file manager with right-click popup menu options for adding, updating, and commiting SVN files, as …

28 October 2007

HOWTO: Rotate JPG images in GNOME’s Nautilus File Manager

Originally published 6 October 2007 in Free Software Magazine. It was pointed out in the comments there that Nautilus Extensions is another way of customizing Nautilus, and that the extension nautilus-actions should be used instead for what I’m trying to do here. I had seen Extensions mentioned as a more powerful alternative at gnome.org, but I still like scripts for this job. However, I should at least acknowledge Nautilus Extensions as another option.

I recently went looking for a way to rotate JPG images from within Nautilus, and found a nice way to do this and more. It’s not difficult to customize the right-click popup menu in Nautilus to perform custom actions on files. Here are some instructions and scripts to get …

14 October 2007

Subversion (SVN) helper bash script to list repo dirs

Finding my way around SVN. So far I’ve created a repository to hold my WordPress theme files and miscellaneous scripts. The working directories are scattered around my home dir, and I found that I wanted a way to view the structure of the repo itself. You can do this with the svn list command:

svn list –recursive file:///path/to/your/svn/repo/dir

And you’ll get a list of all your directories and files. I thought it might be nice to only see the dirs, and then furthernice to specify the depth of dirs to browse, so I cobbled together the bash script below to accomplish this. It takes the output from svn list -R and prints only items that end with a forward slash, e.g.:

svn list -R file:///home/scarpent/src/svn | svn-dirs.sh -d 2

To …

15 April 2007

bash shell script: copy only files modifed after specified date

Updated, 27 September 2007: See notes below…

I’ve mentioned a few times lately that I’m working on my backup plan for GNU/Linux. I started by looking at great free software tools like Samba’s rsync and GNU Tar, and I don’t think I need to look much further than them. There is also GNU Cpio, which I haven’t really investigated yet.

I may have more to say later about my rsync and tar adventures, but for today here’s something I came up with to emulate a feature of a tool I had in Windows that I couldn’t find how to do with existing tools in GNU. The xcopy DOS command lets you recursively copy files modified after a certain date by using the …