-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-host.sh
More file actions
68 lines (57 loc) · 1.89 KB
/
setup-host.sh
File metadata and controls
68 lines (57 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# setup-host.sh - Run this on your HOST machine before starting the devcontainer
set -e
echo "🏠 Setting up LodeTime workspace on host..."
# Detect OS
case "$(uname -s)" in
Darwin*) OS="macOS" ;;
Linux*)
if grep -q Microsoft /proc/version 2>/dev/null; then
OS="WSL"
else
OS="Linux"
fi
;;
*) OS="Unknown" ;;
esac
echo " Detected: $OS"
# Create workspace directory
WORKSPACE_DIR="$HOME/lodetime-workspace"
if [ -d "$WORKSPACE_DIR" ]; then
echo " Workspace already exists: $WORKSPACE_DIR"
else
echo " Creating workspace: $WORKSPACE_DIR"
mkdir -p "$WORKSPACE_DIR"/{backups,dropzone,scratch,exports,chat-sessions}
fi
# Create subdirectories
mkdir -p "$WORKSPACE_DIR"/{backups,dropzone,scratch,exports,chat-sessions}
# WSL-specific: Create Windows-accessible dropzone
if [ "$OS" = "WSL" ]; then
WIN_HOME=$(wslpath "$(cmd.exe /c 'echo %USERPROFILE%' 2>/dev/null | tr -d '\r')")
WIN_DROPZONE="$WIN_HOME/lodetime-dropzone"
if [ ! -d "$WIN_DROPZONE" ]; then
echo " Creating Windows dropzone: $WIN_DROPZONE"
mkdir -p "$WIN_DROPZONE"
fi
# Symlink for easy access
if [ ! -L "$WORKSPACE_DIR/win-dropzone" ]; then
ln -sf "$WIN_DROPZONE" "$WORKSPACE_DIR/win-dropzone"
echo " Linked Windows dropzone"
fi
fi
echo ""
echo "✅ Host setup complete!"
echo ""
echo "Workspace: $WORKSPACE_DIR"
echo " ├── backups/ - Manual backups"
echo " ├── dropzone/ - File exchange with host"
echo " ├── scratch/ - Temporary experiments"
echo " ├── exports/ - Exported work"
echo " └── chat-sessions/ - Saved conversations"
echo ""
echo "Next steps:"
echo " 1. Open this folder in VS Code"
echo " 2. Click 'Reopen in Container' when prompted"
echo " 3. Run: ./build.sh"
echo " 4. Run: ./bin/lode status"
echo ""