From 037adcdc8a2a8613a1047653f6cb6adae97704e2 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 7 Mar 2025 16:10:16 +0900 Subject: [PATCH] added auto clone and auto ran of install.sh --- README.md | 6 ++++++ auto-install.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 auto-install.sh diff --git a/README.md b/README.md index f2010ea..c5f88d1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/auto-install.sh b/auto-install.sh new file mode 100644 index 0000000..1ffc9c8 --- /dev/null +++ b/auto-install.sh @@ -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 + + +