(feat): working on rust build of dotfiles
This commit is contained in:
		
							parent
							
								
									54c0b7dee4
								
							
						
					
					
						commit
						a13f95c036
					
				
					 118 changed files with 248 additions and 0 deletions
				
			
		
							
								
								
									
										7
									
								
								rust_build/Cargo.lock
									
										
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								rust_build/Cargo.lock
									
										
									
										generated
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					# This file is automatically @generated by Cargo.
 | 
				
			||||||
 | 
					# It is not intended for manual editing.
 | 
				
			||||||
 | 
					version = 3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "rust_build"
 | 
				
			||||||
 | 
					version = "0.1.0"
 | 
				
			||||||
							
								
								
									
										6
									
								
								rust_build/Cargo.toml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								rust_build/Cargo.toml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					[package]
 | 
				
			||||||
 | 
					name = "rust_build"
 | 
				
			||||||
 | 
					version = "0.1.0"
 | 
				
			||||||
 | 
					edition = "2021"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[dependencies]
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack.zip
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack.zip
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-Bold.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-Bold.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-BoldItalic.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-BoldItalic.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-Italic.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-Italic.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFont-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-Bold.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-Bold.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-BoldItalic.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-BoldItalic.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-Italic.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-Italic.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontMono-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-Bold.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-Bold.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-BoldItalic.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-BoldItalic.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-Italic.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-Italic.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/Hack/HackNerdFontPropo-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										45
									
								
								rust_build/src/Hack/LICENSE.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								rust_build/src/Hack/LICENSE.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,45 @@
 | 
				
			||||||
 | 
					The work in the Hack project is Copyright 2018 Source Foundry Authors and licensed under the MIT License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The work in the DejaVu project was committed to the public domain.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### MIT License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2018 Source Foundry Authors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
 | 
					in the Software without restriction, including without limitation the rights
 | 
				
			||||||
 | 
					to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
				
			||||||
 | 
					copies of the Software, and to permit persons to whom the Software is
 | 
				
			||||||
 | 
					furnished to do so, subject to the following conditions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The above copyright notice and this permission notice shall be included in all
 | 
				
			||||||
 | 
					copies or substantial portions of the Software.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
				
			||||||
 | 
					IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
				
			||||||
 | 
					FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
				
			||||||
 | 
					AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
				
			||||||
 | 
					LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
				
			||||||
 | 
					OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
				
			||||||
 | 
					SOFTWARE.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### BITSTREAM VERA LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera".
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.
 | 
				
			||||||
							
								
								
									
										8
									
								
								rust_build/src/Hack/readme.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								rust_build/src/Hack/readme.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Nerd Fonts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This is an archived font from a Nerd Fonts release.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For more information see:
 | 
				
			||||||
 | 
					* https://github.com/ryanoasis/nerd-fonts/
 | 
				
			||||||
 | 
					* https://github.com/ryanoasis/nerd-fonts/releases/latest/
 | 
				
			||||||
							
								
								
									
										167
									
								
								rust_build/src/main.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										167
									
								
								rust_build/src/main.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,167 @@
 | 
				
			||||||
 | 
					use std::env;
 | 
				
			||||||
 | 
					use std::fs;
 | 
				
			||||||
 | 
					use std::process::Command;
 | 
				
			||||||
 | 
					use std::io::Write;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					fn main() {
 | 
				
			||||||
 | 
					    // Function to detect the Linux distribution
 | 
				
			||||||
 | 
					    fn detect_linux_distro() -> String {
 | 
				
			||||||
 | 
					        if let Ok(os_release) = fs::read_to_string("/etc/os-release") {
 | 
				
			||||||
 | 
					            for line in os_release.lines() {
 | 
				
			||||||
 | 
					                if line.starts_with("ID=") {
 | 
				
			||||||
 | 
					                    return line.split('=').nth(1).unwrap_or("unknown").trim_matches('"').to_string();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else if let Ok(lsb_release) = fs::read_to_string("/etc/lsb-release") {
 | 
				
			||||||
 | 
					            for line in lsb_release.lines() {
 | 
				
			||||||
 | 
					                if line.starts_with("DISTRIBUTOR_ID=") {
 | 
				
			||||||
 | 
					                    return line.split('=').nth(1).unwrap_or("unknown").trim_matches('"').to_string();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else if fs::metadata("/etc/debian_version").is_ok() {
 | 
				
			||||||
 | 
					            return "debian".to_string();
 | 
				
			||||||
 | 
					        } else if fs::metadata("/etc/redhat-release").is_ok() {
 | 
				
			||||||
 | 
					            return "redhat".to_string();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        "unknown".to_string()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Detect the Linux distribution
 | 
				
			||||||
 | 
					    let distro = detect_linux_distro();
 | 
				
			||||||
 | 
					    let package_manager = match distro.as_str() {
 | 
				
			||||||
 | 
					        "fedora" | "rhel" | "centos" => "dnf",
 | 
				
			||||||
 | 
					        "debian" | "ubuntu" | "pop" => "apt",
 | 
				
			||||||
 | 
					        _ => {
 | 
				
			||||||
 | 
					            eprintln!("Unsupported distribution: {}", distro);
 | 
				
			||||||
 | 
					            std::process::exit(1);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Update system before installing packages
 | 
				
			||||||
 | 
					    if package_manager == "dnf" {
 | 
				
			||||||
 | 
					        Command::new("sudo").arg("dnf").arg("update").status().expect("Failed to update");
 | 
				
			||||||
 | 
					        Command::new("sudo").arg("dnf").arg("upgrade").status().expect("Failed to upgrade");
 | 
				
			||||||
 | 
					    } else if package_manager == "apt" {
 | 
				
			||||||
 | 
					        Command::new("sudo").arg("apt").arg("update").status().expect("Failed to update");
 | 
				
			||||||
 | 
					        Command::new("sudo").arg("apt").arg("upgrade").arg("-y").status().expect("Failed to upgrade");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Setup Flatpak
 | 
				
			||||||
 | 
					    Command::new("flatpak").arg("remote-add").arg("--if-not-exists").arg("flathub").arg("https://dl.flathub.org/repo/flathub.flatpakrepo").status().expect("Failed to add Flatpak remote");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    let package_list = [
 | 
				
			||||||
 | 
					        "btop", "curl", "git", "gh", "fd-find", "flatpak",
 | 
				
			||||||
 | 
					        "libfontconfig-dev", "libssl-dev", "neofetch", "python3",
 | 
				
			||||||
 | 
					        "python3-pip", "ripgrep", "virt-manager", "zsh"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    let flatpak_list = [
 | 
				
			||||||
 | 
					        "com.bitwarden.desktop", "com.github.tchx84.Flatseal", "com.valvesoftware.Steam",
 | 
				
			||||||
 | 
					        "net.davidotek.pupgui2", "net.veloren.airshipper", "org.videolan.VLC"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("#######################");
 | 
				
			||||||
 | 
					    println!("# Installing Packages #");
 | 
				
			||||||
 | 
					    println!("#######################");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for package_name in &package_list {
 | 
				
			||||||
 | 
					        if package_manager == "dnf" {
 | 
				
			||||||
 | 
					            let output = Command::new("dnf").arg("list").arg("--installed").output().expect("Failed to list installed packages");
 | 
				
			||||||
 | 
					            if !String::from_utf8_lossy(&output.stdout).contains(package_name) {
 | 
				
			||||||
 | 
					                println!("Installing {}...", package_name);
 | 
				
			||||||
 | 
					                std::thread::sleep(std::time::Duration::from_millis(500));
 | 
				
			||||||
 | 
					                Command::new("sudo").arg("dnf").arg("install").arg(package_name).arg("-y").status().expect("Failed to install package");
 | 
				
			||||||
 | 
					                println!("{} has been installed", package_name);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                println!("{} already installed", package_name);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else if package_manager == "apt" {
 | 
				
			||||||
 | 
					            let output = Command::new("dpkg").arg("-l").output().expect("Failed to list installed packages");
 | 
				
			||||||
 | 
					            if !String::from_utf8_lossy(&output.stdout).contains(package_name) {
 | 
				
			||||||
 | 
					                println!("Installing {}...", package_name);
 | 
				
			||||||
 | 
					                std::thread::sleep(std::time::Duration::from_millis(500));
 | 
				
			||||||
 | 
					                Command::new("sudo").arg("apt").arg("install").arg(package_name).arg("-y").status().expect("Failed to install package");
 | 
				
			||||||
 | 
					                println!("{} has been installed", package_name);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                println!("{} already installed", package_name);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for flatpak_name in &flatpak_list {
 | 
				
			||||||
 | 
					        let output = Command::new("flatpak").arg("list").output().expect("Failed to list Flatpak applications");
 | 
				
			||||||
 | 
					        if !String::from_utf8_lossy(&output.stdout).contains(flatpak_name) {
 | 
				
			||||||
 | 
					            Command::new("flatpak").arg("install").arg(flatpak_name).arg("-y").status().expect("Failed to install Flatpak application");
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            println!("{} already installed", flatpak_name);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("###################");
 | 
				
			||||||
 | 
					    println!("# Setting up NVIM #");
 | 
				
			||||||
 | 
					    println!("###################");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Command::new("curl").arg("-LO").arg("https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz").status().expect("Failed to download NVIM");
 | 
				
			||||||
 | 
					    Command::new("sudo").arg("rm").arg("-rf").arg("/opt/nvim").status().expect("Failed to remove existing NVIM installation");
 | 
				
			||||||
 | 
					    Command::new("sudo").arg("tar").arg("-C").arg("/opt").arg("-xzf").arg("nvim-linux64.tar.gz").status().expect("Failed to extract NVIM");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("##########");
 | 
				
			||||||
 | 
					    println!("# pynvim #");
 | 
				
			||||||
 | 
					    println!("##########");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Command::new("/usr/bin/python3").arg("-m").arg("pip").arg("install").arg("pynvim").status().expect("Failed to install pynvim");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("#####################");
 | 
				
			||||||
 | 
					    println!("# Install Nerd Font #");
 | 
				
			||||||
 | 
					    println!("#####################");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Command::new("wget").arg("https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Hack.zip").status().expect("Failed to download Nerd Font");
 | 
				
			||||||
 | 
					    Command::new("unzip").arg("Hack.zip").arg("-d").arg("Hack").status().expect("Failed to unzip Nerd Font");
 | 
				
			||||||
 | 
					    fs::create_dir_all("~/.local/share/fonts").expect("Failed to create fonts directory");
 | 
				
			||||||
 | 
					    fs::copy("Hack/HackNerdFont-Regular.ttf", "~/.local/share/fonts/HackNerdFont-Regular.ttf").expect("Failed to copy Nerd Font");
 | 
				
			||||||
 | 
					    Command::new("fc-cache").arg("-f").arg("-v").status().expect("Failed to update font cache");
 | 
				
			||||||
 | 
					    fs::remove_dir_all("Hack*").expect("Failed to remove temporary Hack directory");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("######################");
 | 
				
			||||||
 | 
					    println!("# Installing OhMyZSH #");
 | 
				
			||||||
 | 
					    println!("######################");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Command::new("sh").arg("-c").arg("$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)").status().expect("Failed to install OhMyZSH");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("###################");
 | 
				
			||||||
 | 
					    println!("# Install Rust Up #");
 | 
				
			||||||
 | 
					    println!("###################");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Command::new("curl").arg("--proto").arg("'=https'").arg("--tlsv1.2").arg("-sSf").arg("https://sh.rustup.rs").arg("|").arg("sh").status().expect("Failed to install Rust Up");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("##################");
 | 
				
			||||||
 | 
					    println!("# Setup Starship #");
 | 
				
			||||||
 | 
					    println!("##################");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Command::new("curl").arg("-sS").arg("https://starship.rs/install.sh").arg("|").arg("sh").status().expect("Failed to install Starship");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    println!("###############");
 | 
				
			||||||
 | 
					    println!("# Config File #");
 | 
				
			||||||
 | 
					    println!("###############");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    fs::copy("terminal/starship.toml", "~/.config/starship.toml").expect("Failed to copy starship config");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Symlink files
 | 
				
			||||||
 | 
					    let files = [
 | 
				
			||||||
 | 
					        "vimrc", "vim", "zshrc", "zsh", "agignore",
 | 
				
			||||||
 | 
					        "gitconfig", "gitignore", "gitmessage", "aliases"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for file in &files {
 | 
				
			||||||
 | 
					        let src = format!("{}/{}", env::current_dir().unwrap().display(), file);
 | 
				
			||||||
 | 
					        let dest = format!("{}/.{}", env::var("HOME").unwrap(), file);
 | 
				
			||||||
 | 
					        println!("\nSimlinking {} to {}", src, dest);
 | 
				
			||||||
 | 
					        if let Err(_) = Command::new("ln").arg("-sf").arg(&src).arg(&dest).status() {
 | 
				
			||||||
 | 
					            eprintln!("Failed to symlink {}", file);
 | 
				
			||||||
 | 
					            std::process::exit(1);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            println!("{} ~> {}", src, dest);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/nvim-linux64.tar.gz
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/nvim-linux64.tar.gz
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rust_build/src/~/.local/share/fonts/HackNerdFont-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/src/~/.local/share/fonts/HackNerdFont-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										1
									
								
								rust_build/target/.rustc_info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								rust_build/target/.rustc_info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					{"rustc_fingerprint":17216844351520621718,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/blake/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"16495917692426387086":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.81.0 (eeb90cda1 2024-09-04)\nbinary: rustc\ncommit-hash: eeb90cda1969383f56a2637cbd3037bdf598841c\ncommit-date: 2024-09-04\nhost: x86_64-unknown-linux-gnu\nrelease: 1.81.0\nLLVM version: 18.1.7\n","stderr":""}},"successes":{}}
 | 
				
			||||||
							
								
								
									
										3
									
								
								rust_build/target/CACHEDIR.TAG
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								rust_build/target/CACHEDIR.TAG
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					Signature: 8a477f597d28d172789f06886806bc55
 | 
				
			||||||
 | 
					# This file is a cache directory tag created by cargo.
 | 
				
			||||||
 | 
					# For information about cache directory tags see https://bford.info/cachedir/
 | 
				
			||||||
							
								
								
									
										0
									
								
								rust_build/target/debug/.cargo-lock
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								rust_build/target/debug/.cargo-lock
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					dcb76b6a8340bb70
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					{"rustc":5620745326244611454,"features":"[]","declared_features":"[]","target":17452924922647107092,"profile":6929766844333714335,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rust_build-65a8d30d1ef9b3ac/dep-bin-rust_build"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					This file has an mtime of when this was started.
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					{"$message_type":"diagnostic","message":"unused import: `std::io::Write`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":58,"byte_end":72,"line_start":4,"line_end":4,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use std::io::Write;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":54,"byte_end":74,"line_start":4,"line_end":5,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::io::Write;","highlight_start":1,"highlight_end":20},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::io::Write`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:4:5\u001b[0m\n\u001b[0m  \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::io::Write;\u001b[0m\n\u001b[0m  \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m     \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m  \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m  \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
 | 
				
			||||||
 | 
					{"$message_type":"diagnostic","message":"1 warning emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 1 warning emitted\u001b[0m\n\n"}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								rust_build/target/debug/deps/rust_build-65a8d30d1ef9b3ac
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rust_build/target/debug/deps/rust_build-65a8d30d1ef9b3ac
									
										
									
									
									
										Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					/home/blake/Github/Personal/dotfiles/rust_build/target/debug/deps/rust_build-65a8d30d1ef9b3ac: src/main.rs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/home/blake/Github/Personal/dotfiles/rust_build/target/debug/deps/rust_build-65a8d30d1ef9b3ac.d: src/main.rs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					src/main.rs:
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue