feat: refresh shared skills catalog

This commit is contained in:
vasily committed 2026-10-30 12:40:16 +08:00
1 parent 98bb35e6fb
commit 418792d1ec
49 files changed
+2273 -2390

No files matched your search

+15 -22
View File
@@ -1,32 +1,25 @@
#!/usr/bin/env bash
# Print a ready-to-paste scp command for pulling a file from this host
# to the user's Windows machine over Tailscale SSH.
# Print a command for the user's Windows machine to pull a path over Tailscale SSH.
set -euo pipefail
HOST="vasily@msi.tail0b014a.ts.net"
DELIVERY_HOST="vasily@msi.tail0b014a.ts.net"
if [[ $# -ne 1 ]]; then
echo "usage: t3-deliver <file-or-directory>" >&2
exit 1
fi
path="$1"
if [[ ! -e "$path" ]]; then
echo "t3-deliver: no such path: $path" >&2
if [[ ! -e "$1" ]]; then
echo "t3-deliver: no such path: $1" >&2
exit 1
fi
if [[ "$path" != /* ]]; then
path="$(realpath "$path")"
else
path="$(realpath -m "$path")"
DELIVERY_PATH="$(realpath -- "$1")"
# Reject characters that cannot be shared safely between cmd and PowerShell.
# OpenSSH SFTP mode handles the quoted remote path without a remote shell.
if [[ "$DELIVERY_PATH" == *[\"\$\`\%\!]* || "$DELIVERY_PATH" == *$'\n'* || "$DELIVERY_PATH" == *$'\r'* ]]; then
echo 't3-deliver: rename or archive this path with a simple name before delivery' >&2
exit 1
fi
flags=""
if [[ -d "$path" ]]; then
flags="-r "
DELIVERY_FLAGS=""
if [[ -d "$DELIVERY_PATH" ]]; then
DELIVERY_FLAGS="-r "
fi
echo "Paste in cmd or PowerShell on your Windows machine:"
echo
echo "${flags}scp ${HOST}:\"${path}\" ."
printf 'Paste in cmd or PowerShell on your Windows machine (OpenSSH scp with SFTP support):\n\n'
printf 'scp %s"%s:%s" .\n' "$DELIVERY_FLAGS" "$DELIVERY_HOST" "$DELIVERY_PATH"