-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·22 lines (18 loc) · 798 Bytes
/
install.sh
File metadata and controls
executable file
·22 lines (18 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# sparkcli installer — symlinks the CLI and sets up user config.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Symlink CLI to PATH
sudo ln -sf "${SCRIPT_DIR}/sparkcli.sh" /usr/local/bin/sparkcli
sudo chmod +x "${SCRIPT_DIR}/sparkcli.sh"
echo "Linked: /usr/local/bin/sparkcli → ${SCRIPT_DIR}/sparkcli.sh"
# Copy example config if not already present
mkdir -p "${HOME}/.sparkcli"
if [ ! -f "${HOME}/.sparkcli/config.conf" ]; then
cp "${SCRIPT_DIR}/config.conf.example" "${HOME}/.sparkcli/config.conf"
echo "Config written to ~/.sparkcli/config.conf — review and adjust before use."
else
echo "Config already exists at ~/.sparkcli/config.conf — not overwritten."
fi
echo ""
echo "sparkcli installed. Run 'sparkcli doctor' to verify your setup."