Revision 7238,
393 bytes
checked in by daisuke, 12 years ago
(diff) |
import emacsen-common
|
Rev | Line | |
---|
[7238] | 1 | require "ftools" |
---|
| 2 | def 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 | |
---|
| 16 | end |
---|
| 17 | changeLink("emacs-21.0.104",Dir.pwd+"/") |
---|
Note: See
TracBrowser
for help on using the repository browser.