mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-20 07:40:46 +08:00
Harden public package installation and release validation
This commit is contained in:
parent
9271494b37
commit
9b2166e5b6
41 changed files with 994 additions and 363 deletions
|
|
@ -1,19 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
# Install presets/netxops into $DSH_HOME/.agent-presets (copy, not symlink).
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
SRC="$ROOT/presets/netxops"
|
||||
DSH_HOME="${DSH_HOME:-$HOME/.dsh}"
|
||||
DEST_PARENT="$DSH_HOME/.agent-presets"
|
||||
DEST="$DEST_PARENT/netxops"
|
||||
|
||||
if [[ ! -f "$SRC/agent.cordis.yml" ]]; then
|
||||
echo "Missing preset dir: $SRC" >&2
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "$DEST_PARENT"
|
||||
rm -rf "$DEST"
|
||||
cp -R "$SRC" "$DEST"
|
||||
date -u +%Y-%m-%dT%H:%M:%SZ > "$DEST/.dsh-netxops-managed"
|
||||
echo "Installed $DEST"
|
||||
echo "Open Settings → Agent presets → Custom → Netx Ops"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
exec node "$SCRIPT_DIR/install-preset.mjs" "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue