fn download_action_scripts()

in src/helper.rs [167:188]


fn download_action_scripts() -> Result<()> {
    // At first clean
    if Path::new(constants::ACTION_IMPL_DIR).exists() {
        if let Err(err) = fs::remove_dir_all(constants::ACTION_IMPL_DIR) {
            println!(
                "Directory {} can not be removed : '{}'",
                constants::ACTION_IMPL_DIR,
                err
            );
        }
    }
    debug!("Downloading the action scripts from the remote repository");
    let command = format!("curl -o /tmp/alar2.tar.gz -L {}", constants::TARBALL);
    run_cmd(&command).context("Archive alar2.tar.gz not downloaded")?;
    debug!("Downloaded the action scripts from the remote repository");
    // Expand the action_implementation directory
    run_cmd(
        "tar --wildcards --strip-component=2 -xzf /tmp/alar2.tar.gz -C /tmp *action_implementation",
    )?;

    Ok(())
}