Skip to content

Commit

Permalink
Separate Zed version file (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
philrz authored Feb 22, 2023
1 parent 68ad434 commit 3550262
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions migrate.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src_zed_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.5.0

0 comments on commit 3550262

Please sign in to comment.