diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cfg/config.rs | 6 | ||||
| -rw-r--r-- | src/net/http_package.rs | 10 | ||||
| -rw-r--r-- | src/pkgtoolkit/pkgtools.rs | 11 |
3 files changed, 15 insertions, 12 deletions
diff --git a/src/cfg/config.rs b/src/cfg/config.rs index 521ffcc..08cdbd9 100644 --- a/src/cfg/config.rs +++ b/src/cfg/config.rs @@ -71,7 +71,11 @@ impl Config { repo_url: format!("https://mesk.anthrill.i2p/repo/{}/", std::env::consts::ARCH), auto_update: true, destination: (String::from("mesk"), String::from("mesk")), - repo_http_url: format!("http://github.com/Anthrill/repo-mirror/{}", std::env::consts::ARCH).into(), + repo_http_url: format!( + "http://github.com/Anthrill/repo-mirror/{}", + std::env::consts::ARCH + ) + .into(), // Its a hurt place, you need to generate destinations by i2pd and paste here (to mesk.toml) // Better to leave it empty or set it to (mesk, mesk), now destination conn not implemented }, diff --git a/src/net/http_package.rs b/src/net/http_package.rs index 92b5ffc..4b2aefa 100644 --- a/src/net/http_package.rs +++ b/src/net/http_package.rs @@ -47,12 +47,14 @@ impl HTTPPackage { let index_url = repo_url_opt.as_deref().map_or_else( || { - log::warn!("Repository URL is None, please specify it in /etc/mesk/mesk.toml and restart."); - String::new() + log::warn!( + "Repository URL is None, please specify it in /etc/mesk/mesk.toml and restart." + ); + String::new() }, - |repo_url_str| { + |repo_url_str| { if repo_url_str.ends_with(".tar.gz") { - repo_url_str.to_string() + repo_url_str.to_string() } else { format!("{}/INDEX.tar.gz", repo_url_str.trim_end_matches('/')) } diff --git a/src/pkgtoolkit/pkgtools.rs b/src/pkgtoolkit/pkgtools.rs index 0105a11..a0433ac 100644 --- a/src/pkgtoolkit/pkgtools.rs +++ b/src/pkgtoolkit/pkgtools.rs @@ -42,7 +42,7 @@ pub struct InstallMeta { user: String, group: String, mode: String, - //! Cancels the previous fields and installs them using the shell script + // Cancels the previous fields and installs them using the shell script custom_script: Option<String>, } @@ -56,9 +56,9 @@ struct Install { #[allow(dead_code)] #[derive(Deserialize, Debug)] struct Setts { - //! Export environment variables if this needed + // Export environment variables if this needed env: Option<String>, - //! Test the package after installation + // Test the package after installation test: Option<String>, } @@ -306,9 +306,7 @@ impl Package { Self::extract_archive(&path_to_archive)?; let archive_path = Path::new(&path_to_archive); - let archive_dir = archive_path - .parent() - .unwrap_or_else(|| Path::new(".")); + let archive_dir = archive_path.parent().unwrap_or_else(|| Path::new(".")); let install_path = archive_dir.join("INSTALL"); let setts_path = archive_dir.join("SETTS"); @@ -355,7 +353,6 @@ impl Package { log::info!("Validating arch..."); - let install_parsed = match install_content { Ok(v) => v, Err(e) => { |
