File: install.rb

package info (click to toggle)
ruby-mp3tag 1.0-12
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 100 kB
  • ctags: 50
  • sloc: ruby: 353; makefile: 10
file content (27 lines) | stat: -rwxr-xr-x 501 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env ruby
require "rbconfig"
require "ftools"
include Config

RV = File.join(CONFIG['sitedir'], CONFIG['MAJOR'] + '.' + CONFIG['MINOR'])
DSTPATH = RV

FILES = %w(mp3tag.rb)
MANFILES = %(mp3tag.3)

File.mkpath DSTPATH, true

begin
  FILES.each { |name|
    File.install name, File.join(DSTPATH), 0644, true
  }
  MANFILES.each {
    |name|
    File.install name, File.join(CONFIG['mandir'], 'man3'), 0644, true
  }
rescue
  puts 'install failed!'
  puts $!
else
  puts 'install succeed!'
end