kitgit

tirbofish/dropbear · diff

b459279 · tk

got python to be working successfully

Unverified

diff --git a/README.md b/README.md
index 97c1018..e69de29 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +0,0 @@
-# dropbear
-
diff --git a/eucalyptus/src/menu.rs b/eucalyptus/src/menu.rs
index c99c5c7..8f5c6b0 100644
--- a/eucalyptus/src/menu.rs
+++ b/eucalyptus/src/menu.rs
@@ -1,5 +1,6 @@
 use std::{
-    fs,
+    fs, io,
+    path::Path,
     process::Command,
     sync::mpsc::{self, Receiver},
 };
@@ -55,6 +56,61 @@ impl MainMenu {
         }
     }
 
+    fn setup_poetry_project(project_path: &Path) -> anyhow::Result<()> {
+        if !Command::new("poetry").args(["--version"]).output().is_ok() {
+            return Err(anyhow!(
+                "Poetry is not installed. Please install it using pipx or the official poetry website"
+            ));
+        }
+
+        let status = Command::new("poetry")
+            .args(&["new", "scripts"])
+            .current_dir(project_path)
+            .status()
+            .expect("Failed to run poetry new");
+        if !status.success() {
+            return Err(anyhow!(io::Error::new(
+                io::ErrorKind::Other,
+                "Poetry project creation failed",
+            )));
+        }
+
+        let scripts_path = project_path.join("scripts");
+        if scripts_path.exists() && scripts_path.is_dir() {
+            for entry in fs::read_dir(&scripts_path)? {
+                let entry = entry?;
+                let path = entry.path();
+                let file_name = path.file_name().unwrap();
+                let dest = project_path.join(file_name);
+                fs::rename(&path, &dest)?;

Large diffs are not rendered by default. Showing the first 50 of 201 lines. Show full diff