package dkml-package-console
Console setup and uninstall executables for Diskuv OCaml (DKML) installation
Install
Dune Dependency
Authors
Maintainers
Sources
dkml-install-api-0.4.0.tar.gz
md5=1b3f42a06b0643eb502e6f65d1769b98
sha512=55d47cb8c570f3e9fbdb5f4f7960c86fbe357df6c5364c82c9eb326150693fa1dbffe3fa3f5682e355f770c5f3c53bd7ce88ec1d1d9eefecceb8f44ed8b1d326
doc/src/dkml-package-console.create/installer_archive.ml.html
Source file installer_archive.ml
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
(** Creates archives meant to be unpacked by an end-user, with a setup executable inside. This module creates a shell script that you need to run to produce a final archive.tar.gz, archive.tar.bz2, etc. *) open Bos open Dkml_install_runner.Error_handling.Monad_syntax let generate ~install_direction ~archive_dir ~target_dir ~abi_selector ~program_name ~program_version = let abi_name = Dkml_install_runner.Path_location.show_abi_selector abi_selector in let program_name_kebab_lower_case = program_name.Dkml_package_console_common.Author_types.name_kebab_lower_case in let direction = match install_direction with | Dkml_install_runner.Path_eval.Global_context.Install -> "i" | Uninstall -> "u" in let installer_basename_with_direction_and_ver = Fmt.str "%s-%s-%s-%s" program_name_kebab_lower_case abi_name direction program_version in let installer_create_sh = Fpath.( target_dir / Printf.sprintf "bundle-%s-%s-%s.sh" program_name_kebab_lower_case abi_name direction) in let* buildhost_abi', _fl = Dkml_install_runner.Host_abi.create_v2 () in let buildhost_abi = Dkml_install_api.Context.Abi_v2.to_canonical_string buildhost_abi' in let translate s = Str.( s |> global_replace (regexp_string "__PLACEHOLDER_BASENAME__") installer_basename_with_direction_and_ver |> global_replace (regexp_string "__PLACEHOLDER_BUILDHOST_ABI__") buildhost_abi |> global_replace (regexp_string "__PLACEHOLDER_ARCHIVE_DIR__") (Fpath.to_string archive_dir)) in Logs.info (fun l -> l "Generating script %a that can produce %s.tar.gz (etc.) archives" Fpath.pp installer_create_sh installer_basename_with_direction_and_ver); Dkml_install_runner.Error_handling.map_rresult_error_to_progress (OS.File.write ~mode:0o750 installer_create_sh (translate (Option.get (Shell_scripts.read "bundle.sh"))))
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>