added auto clone and auto ran of install.sh

This commit is contained in:
JaKooLit
2025-03-07 16:10:16 +09:00
parent e0c9f93834
commit 037adcdc8a
2 changed files with 40 additions and 0 deletions

View File

@@ -107,6 +107,12 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
- There is an guide by Asusctl dev [`Asusctl`](https://asus-linux.org/wiki/opensuse-guide/)
- However. during my test, the ROG gui is not behaving well, and I cant click any button. So The asusctl and supergfxctl that I have set here are build from source through their gitlab
## ✨ Auto clone and install
- you can use this command to automatically clone the installer and ran the script for you
```bash
sh <(curl -L https://raw.githubusercontent.com/JaKooLit/OpenSuse-Hyprland/main/auto-install.sh)
```
## ✨ to use this script
> clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
```bash

34
auto-install.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# https://github.com/JaKooLit
Distro="OpenSuse-Hyprland"
Github_URL="https://github.com/JaKooLit/$Distro.git"
Distro_DIR="$HOME/$Distro"
printf "\n%.0s" {1..1}
# Package GIT
if ! command -v git &> /dev/null
then
echo "Git not found! Installing Git..."
sudo zypper in -y --no-recommends git
fi
printf "\n%.0s" {1..1}
# Check if the repository already exists
if [ -d "$Distro_DIR" ]; then
echo "$Distro_DIR exists. Updating the repository..."
cd "$Distro_DIR"
git stash && git pull
chmod +x install.sh
./install.sh
else
echo "$Distro_DIR does not exist. Cloning the repository..."
git clone --depth=1 "$Github_URL" "$Distro_DIR"
cd "$Distro_DIR"
chmod +x install.sh
./install.sh
fi