From 355026203757750302383bb2f77236f54578dc22 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Wed, 22 Feb 2023 11:57:58 -0800 Subject: [PATCH] Separate Zed version file (#3) --- migrate.sh | 11 ++++++++--- src_zed_version | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 src_zed_version diff --git a/migrate.sh b/migrate.sh index 73699e1..533100b 100755 --- a/migrate.sh +++ b/migrate.sh @@ -1,28 +1,33 @@ #!/bin/sh -prior_zed_version="v1.5.0" - cd "$(dirname "$0")" -prior_zed="$(pwd)/zed-$prior_zed_version" case $(uname -s) in Darwin ) PATH=/Applications/Zui.app/Contents/Resources/app.asar.unpacked/zdeps:$PATH src_dir="$HOME/Library/Application Support/Brim/lake" dst_dir="$HOME/Library/Application Support/Zui/lake" + prior_zed="$(pwd)/zed-$(cat src_zed_version)" ;; Linux ) PATH=/opt/Zui/resources/app.asar.unpacked/zdeps:$PATH src_dir=$HOME/.config/Brim/lake dst_dir=$HOME/.config/Zui/lake + prior_zed="$(pwd)/zed-$(cat src_zed_version)" ;; * ) # Windows PATH=$LOCALAPPDATA/Programs/Zui/resources/app.asar.unpacked/zdeps:$PATH src_dir=$APPDATA/Brim/lake dst_dir=$APPDATA/Zui/lake + prior_zed="$(pwd)/zed-$(cat src_zed_version).exe" ;; esac +if [ ! -x "$prior_zed" ]; then + echo "fatal error: $prior_zed executable not found" >&2 + exit 1 +fi + if [ $# -gt 2 ] || [ $# -eq 1 ]; then echo "usage: $0 [SRC_DATA_DIR] [DST_DATA_DIR]" >&2 exit 1 diff --git a/src_zed_version b/src_zed_version new file mode 100644 index 0000000..2e7bd91 --- /dev/null +++ b/src_zed_version @@ -0,0 +1 @@ +v1.5.0