kcm/bin/scripts/install-global.sh
Menno van Leeuwen 1dad8ca69b
feat: Implement clipboard manager commands and history management
- Added command to clear clipboard history (`cmd_clear.go`).
- Implemented command to copy a history item back to the clipboard (`cmd_copy.go`).
- Created command to list clipboard history (`cmd_list.go`).
- Developed command to watch clipboard changes and store history (`cmd_watch.go`).
- Introduced configuration loading for logging and clipboard settings (`config.go`).
- Established main application logic with command registration and configuration handling (`main.go`).
- Implemented history management with loading, saving, and clearing functionality (`history.go`).
- Defined history item structure to store clipboard data (`history_item.go`).
- Added utility functions for hashing data and summarizing clipboard content (`hash.go`, `summary.go`).
- Updated dependencies in `go.sum`.
2025-05-20 17:52:58 +02:00

28 lines
922 B
Bash
Executable File

#!/usr/bin/env bash
source bin/helpers/func.sh
# Remove any existing kcm installation
if [ -f "/usr/local/bin/kcm" ]; then
printfe "%s\n" "yellow" "Removing existing kcm installation..."
rm /usr/local/bin/kcm
fi
if [ -f "/usr/share/bash-completion/completions/kcm" ]; then
printfe "%s\n" "yellow" "Removing existing kcm bash completion..."
rm /usr/share/bash-completion/completions/kcm
fi
# Copy binary files to /usr/local/bin
printfe "%s\n" "cyan" "Installing kcm..."
cp $(pwd)/bin/kcm /usr/local/bin/kcm
cp $(pwd)/bin/kcm-completion.bash /usr/share/bash-completion/completions/kcm
# In case /etc/kcm/config.yaml does not exist, create it
if [ ! -f "/etc/kcm/config.local.yaml" ]; then
printfe "%s\n" "cyan" "Creating default configuration file..."
mkdir -p /etc/kcm
cp $(pwd)/config/config.local.example.yaml /etc/kcm/config.local.yaml
fi
printfe "%s\n" "green" "Installation complete."