fixed scripts for dynamic path detection

This commit is contained in:
Boki 2025-06-13 07:44:15 -04:00
parent f2b77f38b4
commit 3227497e45
5 changed files with 67 additions and 10 deletions

View file

@ -47,7 +47,15 @@ echo -e "${CYAN}🚀 Starting complete build process...${NC}"
# Store original location
ORIGINAL_DIR=$(pwd)
cd "/home/boki/stock-bot"
# Find git root directory
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [ $? -ne 0 ]; then
echo -e "${RED}Error: Not in a git repository. Please run this script from within the stock-bot git repository.${NC}"
exit 1
fi
cd "$GIT_ROOT"
cleanup() {
cd "$ORIGINAL_DIR"