Cool Install Script

Single File Install Config

Published on Jun 13, 2024


One Liner

1sh -c "$(curl -fsSL https://raw.githubusercontent.com/KazeTachinuu/config/master/install.sh)"

Actual Script

 1  #!/bin/sh
 2
 3# Color definitions
 4print_color() {
 5    case $1 in
 6        "info") printf "\033[36m%s\033[0m\n" "$2" ;;    # Cyan for info
 7        "success") printf "\033[32m%s\033[0m\n" "$2" ;; # Green for success
 8        "warning") printf "\033[33m%s\033[0m\n" "$2" ;; # Yellow for warning
 9        "error") printf "\033[31m%s\033[0m\n" "$2" ;;   # Red for error
10    esac
11}
12
13# Download installation scripts
14download_scripts() {
15    print_color "info" "Downloading installation scripts..."
16    
17    curl -fsSL "https://raw.githubusercontent.com/KazeTachinuu/config/master/installvim.sh" -o "/tmp/installvim.sh"
18    curl -fsSL "https://raw.githubusercontent.com/KazeTachinuu/config/master/installzsh.sh" -o "/tmp/installzsh.sh"
19    
20    chmod +x "/tmp/installvim.sh" "/tmp/installzsh.sh"
21}
22
23# Main installation
24main() {
25    print_color "info" "Starting installation process..."
26    
27    # Download and run installation scripts
28    download_scripts
29    
30    print_color "info" "Installing Vim configuration..."
31    sh /tmp/installvim.sh
32    
33    print_color "info" "Installing Zsh configuration..."
34    sh /tmp/installzsh.sh
35    
36    # Cleanup
37    rm -f "/tmp/installvim.sh" "/tmp/installzsh.sh"
38    
39    print_color "success" "Installation complete! Please restart your terminal."
40    
41    # Start new zsh session
42    if command -v zsh >/dev/null; then
43        exec zsh -l
44    fi
45}
46
47# Execute main function
48main
49
50
51