Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

> Breaking: this release removes all code and documentation that belongs to the cortex product. This repo is now exclusively dotfiles — configuration files, installer, and shell aliases.

- `curl -fsSL https://raw.githubusercontent.com/barbatdev/cortex-dots/v0.2.0/install.sh | bash` installs from this release.

### Breaking

- Removed `docs/` — agent-state spec, workflow docs, keymaps, release checklist (belong to cortex product).
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ The repo is intentionally generic. Private paths, tokens, emails, hostnames, pro

## Install

Install latest release:

```bash
curl -fsSL https://raw.githubusercontent.com/barbatdev/cortex-dots/v0.2.0/install.sh | bash
```

Install a specific version:

```bash
curl -fsSL https://raw.githubusercontent.com/barbatdev/cortex-dots/v0.1.1/install.sh | bash
```

Install from source (manual):

```bash
git clone <repo-url> ~/.cortex/cortex-dots
cd ~/.cortex/cortex-dots
Expand Down
34 changes: 32 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,37 @@
# install.sh — Instalador de dotfiles
set -e

DOTFILES="$(cd "$(dirname "$0")" && pwd)"
# If running via curl pipe (stdin), download to temp dir from the repo.
# Usage: curl -fsSL https://raw.githubusercontent.com/barbatdev/cortex-dots/v0.2.0/install.sh | bash
if [ -t 0 ]; then
DOTFILES="$(cd "$(dirname "$0")" && pwd)"
else
# Running from stdin — download the repo to a temp dir.
# Allow overriding the release tag via CORTEX_DOTS_TAG env var.
REPO_ORG="barbatdev"
REPO_NAME="cortex-dots"
TAG="${CORTEX_DOTS_TAG:-main}"
TMPDIR_INSTALL="$(mktemp -d)"
trap 'rm -rf "$TMPDIR_INSTALL"' EXIT INT TERM
DOTFILES="$TMPDIR_INSTALL/$REPO_NAME"
curl -fsSL "https://github.com/${REPO_ORG}/${REPO_NAME}/archive/refs/tags/${TAG}.tar.gz" -o "$TMPDIR_INSTALL/release.tar.gz" || {
echo "ERROR: could not download release $TAG from GitHub" >&2
exit 1
}
tar -xzf "$TMPDIR_INSTALL/release.tar.gz" -C "$TMPDIR_INSTALL" || {
echo "ERROR: failed to extract release $TAG" >&2
exit 1
}
# The tarball extracts as $REPO_NAME-$TAG/, rename to clean path
EXTRACTED_DIR="$TMPDIR_INSTALL/${REPO_NAME}-${TAG}"
if [ -d "$EXTRACTED_DIR" ]; then
mv "$EXTRACTED_DIR" "$DOTFILES"
fi
if [ ! -f "$DOTFILES/install.sh" ]; then
echo "ERROR: release $TAG does not contain install.sh" >&2
exit 1
fi
fi
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
DRY_RUN=false
CHECK_MODE=false
Expand Down Expand Up @@ -479,7 +509,7 @@ release_ghostty_pending_lock() {
GHOSTTY_PENDING_LOCK_HELD=false
}

trap 'release_ghostty_pending_lock' EXIT
trap 'release_ghostty_pending_lock; rm -rf "${TMPDIR_INSTALL:-}"' EXIT

defer_ghostty_target() {
local src="$1"
Expand Down
Loading