7a7b2490c2
- justfile: add build-linux, build-windows, build-all (output to dist/) - .gitignore: cover ctask, ctask-*, dist/ - scripts/install.sh + scripts/uninstall.sh: POSIX equivalents of .ps1 - remove WorkspacePath metadata field (no production readers; legacy task.yaml files continue to parse silently) Linux smoke-test on WSL/container pending. See audit-report.md and v0.5.1-spec.md.
41 lines
1.1 KiB
Bash
41 lines
1.1 KiB
Bash
#!/bin/sh
|
|
# Uninstall ctask from ~/.local/bin (or pass an alternative directory as $1).
|
|
# Removes the binary and ctask-statusline.sh helper from the install directory.
|
|
# Does NOT remove CTASK_ROOT, workspaces, or task data.
|
|
|
|
set -eu
|
|
|
|
INSTALL_DIR="${1:-$HOME/.local/bin}"
|
|
|
|
printf 'ctask uninstall\n'
|
|
printf ' Install dir: %s\n\n' "$INSTALL_DIR"
|
|
|
|
if [ ! -d "$INSTALL_DIR" ]; then
|
|
printf ' Nothing to uninstall. Directory does not exist.\n'
|
|
exit 0
|
|
fi
|
|
|
|
# Only remove ctask-owned files
|
|
removed=0
|
|
for name in ctask ctask-statusline.sh; do
|
|
target="$INSTALL_DIR/$name"
|
|
if [ -f "$target" ]; then
|
|
rm -f "$target"
|
|
printf ' Removed %s\n' "$name"
|
|
removed=$((removed + 1))
|
|
fi
|
|
done
|
|
|
|
if [ "$removed" = "0" ]; then
|
|
printf ' No ctask files found in install directory.\n'
|
|
fi
|
|
|
|
printf '\n PATH: not modified.\n'
|
|
printf ' If you added %s to $PATH manually, remove the entry from your shell config.\n' "$INSTALL_DIR"
|
|
|
|
printf '\nWorkspace data is untouched:\n'
|
|
root="${CTASK_ROOT:-$HOME/ai-workspaces}"
|
|
printf ' %s\n' "$root"
|
|
|
|
printf '\nDone.\n'
|