|
39 | 39 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
40 | 40 | INSTALL_DIR="$HOME/.files-db-mcp"
|
41 | 41 |
|
42 |
| -# Create alias in ~/.bashrc or ~/.zshrc |
43 |
| -SHELL_RC="" |
44 |
| -if [ -f "$HOME/.zshrc" ]; then |
45 |
| - SHELL_RC="$HOME/.zshrc" |
46 |
| -elif [ -f "$HOME/.bashrc" ]; then |
47 |
| - SHELL_RC="$HOME/.bashrc" |
48 |
| -fi |
49 |
| - |
50 |
| -if [ -n "$SHELL_RC" ]; then |
51 |
| - echo "Adding alias to $SHELL_RC..." |
52 |
| - |
53 |
| - # Remove old alias if it exists |
54 |
| - sed -i.bak '/alias files-db-mcp=/d' "$SHELL_RC" |
55 |
| - |
56 |
| - # Add new alias |
57 |
| - echo "alias files-db-mcp='$SCRIPT_DIR/run.sh'" >> "$SHELL_RC" |
58 |
| - |
59 |
| - echo "Alias added. You can now use 'files-db-mcp' command in any project directory." |
60 |
| - echo "Please restart your shell or run 'source $SHELL_RC' to use the command." |
61 |
| -else |
62 |
| - echo "Could not find .zshrc or .bashrc to add alias." |
63 |
| - echo "To use Files-DB-MCP, run:" |
64 |
| - echo " $SCRIPT_DIR/run.sh" |
65 |
| -fi |
| 42 | +# Suggest how to add alias |
| 43 | +echo "To add a convenient alias for Files-DB-MCP, add the following line to your shell profile:" |
| 44 | +echo |
| 45 | +echo " alias files-db-mcp='$SCRIPT_DIR/run.sh'" |
| 46 | +echo |
| 47 | +echo "For example, in ~/.bashrc, ~/.zshrc, or your preferred shell configuration file." |
| 48 | +echo "After adding the alias, run 'source ~/.bashrc' (or your shell config file) to activate it." |
| 49 | +echo |
| 50 | +echo "Alternatively, you can run Files-DB-MCP directly with:" |
| 51 | +echo " $SCRIPT_DIR/run.sh" |
| 52 | +echo |
66 | 53 |
|
67 | 54 | # Make scripts executable
|
68 | 55 | chmod +x "$SCRIPT_DIR/run.sh"
|
|
0 commit comments