chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$skillDir = Split-Path -Parent $scriptDir
|
||||
|
||||
$reasonixHome = if ($env:USERPROFILE) {
|
||||
Join-Path $env:USERPROFILE ".reasonix"
|
||||
} else {
|
||||
throw "USERPROFILE is unavailable."
|
||||
}
|
||||
|
||||
$destRoot = Join-Path $reasonixHome "skills"
|
||||
$destDir = Join-Path $destRoot "cli-anything"
|
||||
|
||||
New-Item -ItemType Directory -Path $destRoot -Force | Out-Null
|
||||
|
||||
if (Test-Path $destDir) {
|
||||
Write-Error "Refusing to overwrite existing skill: $destDir`nRemove it manually if you want to reinstall."
|
||||
}
|
||||
|
||||
Copy-Item -Path $skillDir -Destination $destDir -Recurse
|
||||
|
||||
Write-Host "Installed Reasonix skill to: $destDir"
|
||||
Write-Host "Restart Reasonix to pick up the new skill."
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
SKILL_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
: "${HOME:?HOME must be set to install a global Reasonix skill}"
|
||||
DEST_ROOT="${HOME}/.reasonix/skills"
|
||||
DEST_DIR="${DEST_ROOT}/cli-anything"
|
||||
|
||||
mkdir -p "${DEST_ROOT}"
|
||||
|
||||
if [[ -e "${DEST_DIR}" ]]; then
|
||||
echo "Refusing to overwrite existing skill: ${DEST_DIR}" >&2
|
||||
echo "Remove it manually if you want to reinstall." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -R "${SKILL_DIR}" "${DEST_DIR}"
|
||||
|
||||
echo "Installed Reasonix skill to: ${DEST_DIR}"
|
||||
echo "Restart Reasonix to pick up the new skill."
|
||||
Reference in New Issue
Block a user