-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_toolkit.sh
More file actions
executable file
·29 lines (24 loc) · 932 Bytes
/
install_toolkit.sh
File metadata and controls
executable file
·29 lines (24 loc) · 932 Bytes
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
#!/bin/bash
# ============================================================
# Toolkit Installer
# Author: Your Name
# Description: Installs the Home Command Center as 'toolkit'
# ============================================================
TOOLKIT_DIR="$(pwd)"
TOOLKIT_MAIN="$TOOLKIT_DIR/toolkit.sh"
INSTALL_DIR="$HOME/.local/bin"
COMMAND_NAME="toolkit"
mkdir -p "$INSTALL_DIR"
if [[ ":$PATH:" != *":$INSTALL_DIR:"* ]]; then
echo "export PATH=\"\$PATH:$INSTALL_DIR\"" >> "$HOME/.bashrc"
export PATH="$PATH:$INSTALL_DIR"
echo "[Installer] Added $INSTALL_DIR to PATH in ~/.bashrc"
fi
ln -sf "$TOOLKIT_MAIN" "$INSTALL_DIR/$COMMAND_NAME"
chmod +x "$TOOLKIT_MAIN"
# Also install updater
ln -sf "$TOOLKIT_DIR/update_toolkit.sh" "$INSTALL_DIR/toolkit-update"
chmod +x "$TOOLKIT_DIR/update_toolkit.sh"
echo "[Installer] Toolkit installed!"
echo "You can now run: $COMMAND_NAME"
echo "You can update with: toolkit-update"