added auto clone and auto ran of install.sh
This commit is contained in:
@@ -96,8 +96,8 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
|
|||||||
|
|
||||||
- After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users)
|
- After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users)
|
||||||
|
|
||||||
## ✨ Auto download and install
|
## ✨ Auto clone and install
|
||||||
- you can use this command to automatically clone and ran the script for you
|
- you can use this command to automatically clone the installer and ran the script for you
|
||||||
```bash
|
```bash
|
||||||
sh <(curl -L https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/auto-install.sh)
|
sh <(curl -L https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/auto-install.sh)
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# https://github.com/JaKooLit
|
# https://github.com/JaKooLit
|
||||||
|
|
||||||
|
Distro="Arch-Hyprland"
|
||||||
|
Github_URL="https://github.com/JaKooLit/$Distro.git"
|
||||||
|
Distro_DIR="$HOME/$Distro"
|
||||||
|
|
||||||
# Check if Git is installed
|
printf "\n%.0s" {1..1}
|
||||||
|
# Package GIT
|
||||||
if ! command -v git &> /dev/null
|
if ! command -v git &> /dev/null
|
||||||
then
|
then
|
||||||
echo "Git not found! Installing Git..."
|
echo "Git not found! Installing Git..."
|
||||||
sudo pacman -S --no-confirm git
|
sudo pacman -S --no-confirm git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define the directory path
|
printf "\n%.0s" {1..1}
|
||||||
Distro_DIR="$HOME/Arch-Hyprland"
|
|
||||||
|
|
||||||
# Check if the repository already exists
|
# Check if the repository already exists
|
||||||
if [ -d "$Distro_DIR" ]; then
|
if [ -d "$Distro_DIR" ]; then
|
||||||
|
echo "$Distro_DIR exists. Updating the repository..."
|
||||||
cd "$Distro_DIR"
|
cd "$Distro_DIR"
|
||||||
git stash && git pull
|
git stash && git pull
|
||||||
chmod +x install.sh
|
chmod +x install.sh
|
||||||
./install.sh
|
./install.sh
|
||||||
else
|
else
|
||||||
# Clone the repository if it doesn't exist
|
|
||||||
echo "$Distro_DIR does not exist. Cloning the repository..."
|
echo "$Distro_DIR does not exist. Cloning the repository..."
|
||||||
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git "$Distro_DIR"
|
git clone --depth=1 "$Github_URL" "$Distro_DIR"
|
||||||
cd "$Distro_DIR"
|
cd "$Distro_DIR"
|
||||||
chmod +x install.sh
|
chmod +x install.sh
|
||||||
echo "Running install.sh..."
|
|
||||||
./install.sh
|
./install.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user