aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/util.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/util.rs b/src/util.rs
index caa2c73..90aacb6 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -4,36 +4,8 @@ use std::fs;
use std::io;
use std::io::Write;
use std::path::Path;
-use std::path::PathBuf;
use std::process::Command;
-pub const TEMP_CONFIG_PATH: &str = "/var/lib/forge/.tmp";
-
-pub fn create_config(package: &str) -> Result<(), String> {
- let filename = format!("{package}.toml");
- let mut path = PathBuf::from(TEMP_CONFIG_PATH);
-
- if !path.exists() {
- fs::create_dir_all(&path)
- .map_err(|e| format!("failed to create temp config directory: {}", e))?;
- }
-
- path.push(filename);
-
- let template = format!(
- r#"# {package} configuration
-update = "tagged" # no | live | tagged
-build = "make"
-install = "make install"
-dependencies = []
- "#
- );
-
- fs::write(path, template).map_err(|e| format!("failed to create config: {}", e))?;
-
- Ok(())
-}
-
pub fn dir_size(path: &Path) -> std::io::Result<u64> {
let mut size = 0;
if path.is_dir() {
7bb8080e2a90d3cbb1d&follow=1'>Major styles update.Gravatar Christoph Lohmann 3-11/+84 2015-01-02Fix a typo in surf manual.Gravatar Jakukyo Friel 1-1/+1 2014-09-28Minor style change.Gravatar Christoph Lohmann 1-1/+1 2014-09-28Make »Copy image address« work.Gravatar Christoph Lohmann 1-3/+10 2014-08-07Mention xdotool in SEE ALSO too.Gravatar Christoph Lohmann 1-1/+2 2014-08-07Fix the manpage about xid.Gravatar Christoph Lohmann 1-1/+3