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-win.bat b/cursor-reset-full-config-win.bat new file mode 100644 index 0000000..178a02c --- /dev/null +++ b/cursor-reset-full-config-win.bat @@ -0,0 +1,43 @@ +@echo on +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... +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