agent-joule/script/snap-try
David Charlot a084434e14 Baseline: hard fork of zed@e2e7a67
Fork point for agent-zed. Editor core retained; AI/telemetry/cloud layers
to be ripped and replaced per FORK_MAP.md.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-05-30 08:20:23 -04:00

25 lines
647 B
Shell
Executable file

#!/usr/bin/env bash
# This script is intended to be run after `snap-build`.
#
# It expects a version to be passed as the first argument, and expects
# the built `.snap` for that version to be in the current directory.
#
# This will uninstall the current `zed` snap, replacing it with a snap
# that directly uses the `snap/unpacked` directory.
set -euxo pipefail
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <release_version>"
exit 1
fi
# Rerun as root
[ "$UID" -eq 0 ] || exec sudo bash -e "$0" "$@"
snap remove zed || true
mkdir -p snap
rm -rf snap/unpacked
unsquashfs -dest snap/unpacked "zed_$1_amd64.snap"
snap try --classic snap/unpacked