From 3f88aa427258d197131c8fb1edc24b1dea65b021 Mon Sep 17 00:00:00 2001 From: Denis Matejcik <115463208+Mild-Solvent@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:43:47 +0100 Subject: [PATCH 1/2] Complete setup in .bat file. User just click and get everything done --- cursor-reset-full-config.bat | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 cursor-reset-full-config.bat diff --git a/cursor-reset-full-config.bat b/cursor-reset-full-config.bat new file mode 100644 index 0000000..db9a42f --- /dev/null +++ b/cursor-reset-full-config.bat @@ -0,0 +1,53 @@ +@echo on +REM Change to the directory where your project should be located +cd "C:\Users\delet\Desktop\cursor-reset" + +REM Check if the cursor-reset folder exists and contains the repository +if not exist "cursor-reset\.git" ( + echo Repository not found. Cloning the repository... + git clone https://github.com/isboyjc/cursor-reset.git + cd "cursor-reset" +) else ( + echo Repository already exists. Changing directory... + cd "cursor-reset" +) + +REM Install dependencies +echo Installing dependencies... +npm install + +REM Check if the dist folder exists and contains the required files +if exist "dist\cursor-reset-linux" if exist "dist\cursor-reset-macos" if exist "dist\cursor-reset-win.exe" ( + echo Required files found in the dist folder. +) else ( + echo Required files not found. Building the project... + cd .. + npm run build:all + cd "cursor-reset" +) + +REM Ask the user to choose which file to run based on their operating system +echo Please select your operating system: +echo 1. Linux +echo 2. macOS +echo 3. Windows +set /p choice="Enter the number corresponding to your OS: " + +REM Run the appropriate file based on the user's choice +if "%choice%"=="1" ( + echo Running cursor-reset-linux... + dist\cursor-reset-linux +) else if "%choice%"=="2" ( + echo Running cursor-reset-macos... + dist\cursor-reset-macos +) else if "%choice%"=="3" ( + echo Running cursor-reset-win.exe... + dist\cursor-reset-win.exe +) else ( + echo Invalid choice. Exiting... + pause + exit /b +) + +REM Optional: Keep the window open after the command runs +pause \ No newline at end of file From 56b5648db50e3973faaebf90f23fc76f28d21425 Mon Sep 17 00:00:00 2001 From: Denis Matejcik <115463208+Mild-Solvent@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:52:17 +0100 Subject: [PATCH 2/2] Complete setup in .bat file. User just click and get everything done --- cursor-reset-full-config-mac-linux.sh | 37 +++++++++++++++++++ ...ig.bat => cursor-reset-full-config-win.bat | 14 +------ 2 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 cursor-reset-full-config-mac-linux.sh rename cursor-reset-full-config.bat => cursor-reset-full-config-win.bat (71%) diff --git a/cursor-reset-full-config-mac-linux.sh b/cursor-reset-full-config-mac-linux.sh new file mode 100644 index 0000000..d41aa85 --- /dev/null +++ b/cursor-reset-full-config-mac-linux.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Ensure the script is running in the correct directory (where package.json is located) +echo "Running in directory: $(pwd)" + +# Install dependencies +echo "Installing dependencies..." +npm install + +# Check if the dist folder exists and contains the required files +if [[ -f "dist/cursor-reset-linux" && -f "dist/cursor-reset-macos" && -f "dist/cursor-reset-win.exe" ]]; then + echo "Required files found in the dist folder." +else + echo "Required files not found. Building the project..." + npm run build:all +fi + +# Ask the user to choose which file to run based on their operating system +echo "Please select your operating system:" +echo "1. Linux" +echo "2. macOS" +echo "3. Windows" +read -p "Enter the number corresponding to your OS: " choice + +# Run the appropriate file based on the user's choice +if [[ "$choice" == "1" ]]; then + echo "Running cursor-reset-linux..." + ./dist/cursor-reset-linux +elif [[ "$choice" == "2" ]]; then + echo "Running cursor-reset-macos..." + ./dist/cursor-reset-macos +elif [[ "$choice" == "3" ]]; then + echo "Running cursor-reset-win.exe..." + echo "This script is running on Linux/macOS. Windows executables cannot be run here." +else + echo "Invalid choice. Exiting..." + exit 1 +fi \ No newline at end of file diff --git a/cursor-reset-full-config.bat b/cursor-reset-full-config-win.bat similarity index 71% rename from cursor-reset-full-config.bat rename to cursor-reset-full-config-win.bat index db9a42f..178a02c 100644 --- a/cursor-reset-full-config.bat +++ b/cursor-reset-full-config-win.bat @@ -1,16 +1,6 @@ @echo on -REM Change to the directory where your project should be located -cd "C:\Users\delet\Desktop\cursor-reset" - -REM Check if the cursor-reset folder exists and contains the repository -if not exist "cursor-reset\.git" ( - echo Repository not found. Cloning the repository... - git clone https://github.com/isboyjc/cursor-reset.git - cd "cursor-reset" -) else ( - echo Repository already exists. Changing directory... - cd "cursor-reset" -) +REM Ensure the script is running in the correct directory (where package.json is located) +echo Running in directory: %cd% REM Install dependencies echo Installing dependencies...