From 33e25d924183429e960efa5c13d230c2efc200a8 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 29 Oct 2022 20:25:11 +0530 Subject: [PATCH] Deduce the filename in developer_console.sh instead of hardcoding it --- scripts/developer_console.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/developer_console.sh b/scripts/developer_console.sh index 3b2208ff..58344678 100755 --- a/scripts/developer_console.sh +++ b/scripts/developer_console.sh @@ -1,5 +1,7 @@ #!/bin/bash +cd "$(dirname "${BASH_SOURCE[0]}")" + if [ "$0" == "bash" ]; then echo "Opening Stable Diffusion UI - Developer Console.." echo "" @@ -35,5 +37,6 @@ if [ "$0" == "bash" ]; then echo "" else - bash --init-file developer_console.sh + file_name=$(basename "${BASH_SOURCE[0]}") + bash --init-file "$file_name" fi