source: projects/emacsen-common/branches/0.4.x/scripts/test/i.rb @ 7238

Revision 7238, 393 bytes checked in by daisuke, 11 years ago (diff)

import emacsen-common

Line 
1require "ftools"
2def changeLink(emacs,dir="/usr/bin/")
3  Dir.open(dir).each{ |name|
4    fullpath = dir+name
5    if fullpath =~/\.#{emacs}$/
6    then
7      srcname = fullpath
8      distname = fullpath.dup
9      distname.sub!(/\.#{emacs}$/,"")
10      File.unlink(distname) if File.symlink?(distname)
11      File.symlink(srcname,distname)
12    end
13
14  }
15
16end
17changeLink("emacs-21.0.104",Dir.pwd+"/")
Note: See TracBrowser for help on using the repository browser.