-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
31 lines (25 loc) · 884 Bytes
/
setup.sh
File metadata and controls
31 lines (25 loc) · 884 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
30
31
#!/usr/bin/env bash
# ccline one-line installer
# curl -fsSL https://raw.githubusercontent.com/itzTiru/ccline/main/setup.sh | bash
set -e
REPO="${CCLINE_REPO:-https://github.com/itzTiru/ccline.git}"
DEST="${CCLINE_DEST:-$HOME/.ccline}"
have() { command -v "$1" >/dev/null 2>&1; }
for dep in git jq bash; do
have "$dep" || { echo "error: '$dep' is required. Install it and retry."; exit 1; }
done
if [ -d "$DEST/.git" ]; then
echo "updating $DEST"
git -C "$DEST" pull --ff-only
else
echo "cloning → $DEST"
git clone --depth=1 "$REPO" "$DEST"
fi
chmod +x "$DEST/bash/ccline" "$DEST/bash/statusline.sh" \
"$DEST/bash/install.sh" "$DEST/bash/uninstall.sh" \
"$DEST/setup.sh"
"$DEST/bash/install.sh"
echo ""
echo "✓ ccline installed at $DEST"
echo " run 'ccline config' anytime to change segments"
echo " run 'ccline uninstall' to revert"