-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-install.sh
More file actions
75 lines (66 loc) · 2.06 KB
/
test-install.sh
File metadata and controls
75 lines (66 loc) · 2.06 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
69
70
71
72
73
74
#!/bin/bash
# Test script to diagnose install.sh issues
echo "=== Testing install.sh components ==="
echo ""
# Test 1: Check DOTFILES_DIR
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "1. DOTFILES_DIR: $DOTFILES_DIR"
echo ""
# Test 2: Check if source directories exist
echo "2. Checking source directories:"
for dir in claude augment copilot windsurf; do
if [[ -d "$DOTFILES_DIR/$dir" ]]; then
echo " ✓ $dir/ exists"
if [[ -d "$DOTFILES_DIR/$dir/commands" ]]; then
echo " ✓ $dir/commands/ exists"
fi
if [[ -d "$DOTFILES_DIR/$dir/agents" ]]; then
echo " ✓ $dir/agents/ exists"
fi
if [[ -d "$DOTFILES_DIR/$dir/prompts" ]]; then
echo " ✓ $dir/prompts/ exists"
fi
if [[ -d "$DOTFILES_DIR/$dir/workflows" ]]; then
echo " ✓ $dir/workflows/ exists"
fi
else
echo " ✗ $dir/ NOT FOUND"
fi
done
echo ""
# Test 3: Check if library files exist
echo "3. Checking library files:"
for file in install/lib/common.sh install/lib/prompts.sh; do
if [[ -f "$DOTFILES_DIR/$file" ]]; then
echo " ✓ $file exists"
else
echo " ✗ $file NOT FOUND"
fi
done
echo ""
# Test 4: Check if agent installer files exist
echo "4. Checking agent installer files:"
for file in install/agents/claude.sh install/agents/augment.sh install/agents/copilot.sh install/agents/windsurf.sh; do
if [[ -f "$DOTFILES_DIR/$file" ]]; then
echo " ✓ $file exists"
else
echo " ✗ $file NOT FOUND"
fi
done
echo ""
# Test 5: Try sourcing common.sh
echo "5. Testing source of common.sh:"
if source "$DOTFILES_DIR/install/lib/common.sh" 2>&1; then
echo " ✓ common.sh sourced successfully"
# Test logging functions
echo ""
echo "6. Testing logging functions:"
log_info "Test info message"
log_warn "Test warning message"
log_success "Test success message"
else
echo " ✗ Failed to source common.sh"
exit 1
fi
echo ""
echo "=== All tests completed ==="