config.cmo:
config.cmx:
-febootstrap_utils.cmi:
-febootstrap_utils.cmo: febootstrap_utils.cmi
-febootstrap_utils.cmx: febootstrap_utils.cmi
febootstrap_cmdline.cmi:
febootstrap_cmdline.cmo: config.cmo febootstrap_cmdline.cmi
febootstrap_cmdline.cmx: config.cmx febootstrap_cmdline.cmi
+febootstrap_utils.cmi:
+febootstrap_utils.cmo: febootstrap_cmdline.cmi febootstrap_utils.cmi
+febootstrap_utils.cmx: febootstrap_cmdline.cmx febootstrap_utils.cmi
febootstrap_package_handlers.cmi:
febootstrap_package_handlers.cmo: febootstrap_utils.cmi \
febootstrap_cmdline.cmi febootstrap_package_handlers.cmi
# Note these must be in build dependency order.
SOURCES = \
config.ml \
- febootstrap_utils.mli \
- febootstrap_utils.ml \
febootstrap_cmdline.mli \
febootstrap_cmdline.ml \
+ febootstrap_utils.mli \
+ febootstrap_utils.ml \
febootstrap_package_handlers.mli \
febootstrap_package_handlers.ml \
febootstrap_yum_rpm.ml \
current directory. Note that if this files exist already in the
output directory then they will be overwritten.
+=item B<--save-temps>
+
+Don't remove temporary files and directories on exit. This is useful
+for debugging.
+
=item B<-v>
=item B<--verbose>
let names_mode = ref false
let outputdir = ref "."
let packages = ref []
+let save_temps = ref false
let verbose = ref false
let warnings = ref true
let yum_config = ref None
" Suppress warnings";
"-o", Arg.Set_string outputdir,
"outputdir Set output directory (default: \".\")";
+ "--save-temp", Arg.Set save_temps,
+ " Don't delete temporary files and directories on exit.";
+ "--save-temps", Arg.Set save_temps,
+ " Don't delete temporary files and directories on exit.";
"-v", Arg.Set verbose,
" Enable verbose output";
"--verbose", Arg.Set verbose,
let names_mode = !names_mode
let outputdir = !outputdir
let packages = List.rev !packages
+let save_temps = !save_temps
let verbose = !verbose
let warnings = !warnings
let yum_config = !yum_config
val packages : string list
(** List of packages or package names as supplied on the command line. *)
+val save_temps : bool
+ (** True if [--save-temps] was given on the command line. *)
+
val verbose : bool
(** True if [--verbose] was given on the command line.
See also {!debug}. *)
*)
let tmpdir = Filename.temp_dir_name // sprintf "febootstrap%s.tmp" data in
Unix.mkdir tmpdir 0o700;
- at_exit
- (fun () ->
- let cmd = sprintf "rm -rf %s" (Filename.quote tmpdir) in
- ignore (Sys.command cmd));
+
+ (* Only remove the directory if --save-temps was *not* specified. *)
+ if not Febootstrap_cmdline.save_temps then
+ at_exit
+ (fun () ->
+ let cmd = sprintf "rm -rf %s" (Filename.quote tmpdir) in
+ ignore (Sys.command cmd));
+
tmpdir
let rec find s sub =