diff options
-rw-r--r-- | hooked/src/main.rs | 6 | ||||
-rw-r--r-- | src/main.rs | 21 |
2 files changed, 14 insertions, 13 deletions
diff --git a/hooked/src/main.rs b/hooked/src/main.rs index 1c8388e..573061c 100644 --- a/hooked/src/main.rs +++ b/hooked/src/main.rs @@ -121,7 +121,7 @@ fn init(lang: Language) -> Result<()> { wrapper.write_all( format!( "#!C:\\Program Files\\Git\\bin\\sh.exe\n\ - bash.exe .dev-suite/hooked/{}.sh\n", + bash.exe .dev-suite/hooked/{}.sh\n", hook ) .as_bytes(), @@ -132,7 +132,7 @@ fn init(lang: Language) -> Result<()> { wrapper.write_all( format!( "#!C:\\Program Files\\Git\\bin\\sh.exe\n\ - py.exe .dev-suite/hooked/{}.py\n", + py.exe .dev-suite/hooked/{}.py\n", hook ) .as_bytes(), @@ -143,7 +143,7 @@ fn init(lang: Language) -> Result<()> { wrapper.write_all( format!( "#!C:\\Program Files\\Git\\bin\\sh.exe\n\ - ruby.exe .dev-suite/hooked/{}.rb\n", + ruby.exe .dev-suite/hooked/{}.rb\n", hook ) .as_bytes(), diff --git a/src/main.rs b/src/main.rs index dc94d00..6830599 100644 --- a/src/main.rs +++ b/src/main.rs @@ -149,15 +149,17 @@ enum Tools { /// Install all of dev-suite fn install() -> Result<()> { - static BASE_URL: &str = - "https://dev-suite-spaces.nyc3.digitaloceanspaces.com/"; - #[cfg(target_os = "macos")] - static TOOLS: [&str; 2] = ["hooked_osx", "ticket_osx"]; + static BASE_URL: &str = + "https://dev-suite-spaces.nyc3.digitaloceanspaces.com/osx/"; #[cfg(target_os = "linux")] - static TOOLS: [&str; 2] = ["hooked_linux", "ticket_linux"]; + static BASE_URL: &str = + "https://dev-suite-spaces.nyc3.digitaloceanspaces.com/linux/"; #[cfg(target_os = "windows")] - static TOOLS: [&str; 2] = ["hooked_windows", "ticket_windows"]; + static BASE_URL: &str = + "https://dev-suite-spaces.nyc3.digitaloceanspaces.com/windows/"; + + static TOOLS: [&str; 2] = ["hooked", "ticket"]; #[cfg(target_os = "macos")] let mut location = PathBuf::from("/usr/local/bin"); @@ -170,13 +172,12 @@ fn install() -> Result<()> { create_dir_all(&location)?; for tool in &TOOLS { - let tool_name = tool.split('_').nth(0).unwrap(); - location.push(tool_name); + location.push(tool); if location.exists() { - println!("{} already exists, skipping", tool_name); + println!("{} already exists, skipping", tool); let _ = location.pop(); } else { - println!("Installing {}", tool_name); + println!("Installing {}", tool); let url = BASE_URL.to_owned() + tool; let mut program = client.get(&url).send()?; |