+ unlink("$subdir/$file");
+ }
+ }
+}
+
+
+# 9. install
+#
+# rename, compress, and install scenery files
+
+sub install {
+ $tmp = $subdir;
+ $tmp =~ s/$work_dir//;
+ # print "Temp dir = $tmp\n";
+ $install_dir = "$fg_root/$tmp";
+ print "Install dir = $install_dir\n";
+ system("mkdir -p $install_dir");
+
+ @FILES = `ls $subdir`;
+ foreach $file ( @FILES ) {
+ chop($file);
+ if ( $file =~ m/\d\d.obj$/ ) {
+ $new_file = file_root($file);
+
+ $command = "gzip -v --best < $subdir/$file > $install_dir/$new_file.gz";
+ # $command = fix_command($command);
+ print "Running '$command'\n";
+ open(OUT, "$command |");
+ while ( <OUT> ) {
+ print $_;
+ }
+ close(OUT);
+
+ unlink("$subdir/$file");