2 # Copyright (C) 2002-2004 Kouichirou Eto, All rights reserved.
4 $LOAD_PATH.unshift("..")
11 print "Usage: make-chisedb-tarball.rb <directory of XEmacs CHISE> <tmp dir>\n"
12 print "% ./make-chisedb-tarball.rb /usr/local/lib/xemacs-21.4.14/i686-pc-linux /var/tmp\n"
17 usage if argv.length < 1
20 dbpath = dir+"chise-db"
21 unless dbpath.directory?
22 print "no chise-db here. #{dbpath.to_s}\n"
26 tmpdir = "/var/tmp" if tmpdir.nil?
32 system "cp -a #{dir}/chise-db ." # copy all of the chise-db to the dir.
35 if f =~ /([*?<>])/ # escape for Windows forbidden characters.
36 nf = f.escape_win_filename
37 cmd = "mv '#{f}' '#{nf}'"
43 system "tar czf chise-db.tar.gz chise-db"
44 system "mv chise-db.tar.gz #{orgdir}"
45 system "rm -rf #{tmpdir}/chise-db"