2 # Copyright (C) 2002-2004 Kouichirou Eto, All rights reserved.
4 $LOAD_PATH.unshift("..")
12 puts "Usage: make-chisedb-tarball.rb <CHISE-DB dir> <tmp dir>"
13 puts "% ./make-chisedb-tarball.rb /usr/local/lib/xemacs-21.4.14/i686-pc-linux/chise-db /var/tmp"
18 usage if argv.length < 1
20 unless dir.path.directory?
21 print "no chise-db here. #{dir}\n"
24 tmpdir = argv.shift || "/var/tmp"
27 print "copy all chise-db to tmpdir"
28 system "cp -a #{dir} #{tmpdir}" #
31 print "escape special characters"
32 Find.find(tmpdir+"/chise-db") {|f|
33 next if f.path.directory?
34 nf = f.path.escape.unix_to_win.to_s
36 cmd = "mv '#{f}' '#{nf}'"
44 system "tar czf chise-db.tar.gz chise-db"
47 system "mv chise-db.tar.gz #{orgdir}"
49 print "remove tmpdir/chise-db"
50 system "rm -rf #{tmpdir}/chise-db"