17 lines
420 B
Bash
Executable File
17 lines
420 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
skill_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
target_dir="${CODEX_HOME:-$HOME/.codex}/skills"
|
|
target="${target_dir}/myblog-blog-writer"
|
|
|
|
mkdir -p "${target_dir}"
|
|
|
|
if [[ -e "${target}" && ! -L "${target}" ]]; then
|
|
echo "Refusing to replace existing non-symlink: ${target}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
ln -sfn "${skill_dir}" "${target}"
|
|
echo "Linked ${target} -> ${skill_dir}"
|