From 3bd369caf74137f2463122b6f34eb59a2b58bebe Mon Sep 17 00:00:00 2001 From: SpikeHD <25207995+SpikeHD@users.noreply.github.com> Date: Wed, 28 Aug 2024 22:10:47 -0700 Subject: [PATCH] fix: tweak portable setup scripts --- setup_portable_debug.cmd | 10 +++++----- setup_portable_debug.sh | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/setup_portable_debug.cmd b/setup_portable_debug.cmd index 9a35bb7f..566910b9 100644 --- a/setup_portable_debug.cmd +++ b/setup_portable_debug.cmd @@ -3,12 +3,12 @@ REM This script will create dirs and files that will make `pnpm tauri dev` instances of Dorion think they are portable. REM This is helpful for testing, as you will be able to put built shelter files in ./src-tauri/injection -set BASE_PATH=./src-tauri/target/debug +set BASE_PATH=.\src-tauri\target\debug\ if not exist %BASE_PATH% ( - echo "Error: %BASE_PATH% does not exist. Build Dorion at least once first!" - exit /b 1 + REM create the directory + mkdir %BASE_PATH% ) -REM Create config.json with an empty JSON object -echo {} > %BASE_PATH%/config.json \ No newline at end of file +REM Create a .portable file +echo "" > %BASE_PATH%\.portable \ No newline at end of file diff --git a/setup_portable_debug.sh b/setup_portable_debug.sh index 96a93bae..32a56b55 100755 --- a/setup_portable_debug.sh +++ b/setup_portable_debug.sh @@ -5,5 +5,10 @@ BASE_PATH=./src-tauri/target/debug/ -# Create config.json with empty JSON oject -echo "{}" > $BASE_PATH/config.json \ No newline at end of file +# mkdir if needed +if [ ! -d "$BASE_PATH" ]; then + mkdir -p $BASE_PATH +fi + +# Create a .portable file +echo "" > $BASE_PATH/.portable \ No newline at end of file