From ad9cd5fc4dbf811e34903fc3e28b4d17695fced0 Mon Sep 17 00:00:00 2001
From: Jed Fox <git@jedfox.com>
Date: Wed, 12 Apr 2023 16:38:26 -0400
Subject: [PATCH] Remove usage of `realpath` (#893)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It turns out this command is not installed by default on macOS.
Fortunately the code doesn’t really require it to be used.
---
 packages/loot-core/bin/copy-migrations | 14 ++++++--------
 upcoming-release-notes/893.md          |  6 ++++++
 2 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 upcoming-release-notes/893.md

diff --git a/packages/loot-core/bin/copy-migrations b/packages/loot-core/bin/copy-migrations
index 81eef9b31..4d83f6dba 100755
--- a/packages/loot-core/bin/copy-migrations
+++ b/packages/loot-core/bin/copy-migrations
@@ -1,11 +1,9 @@
 #!/bin/sh -e
 
-dest_dir=$(realpath "$1")
+ROOT=`dirname $(dirname "$0")`
+DEST="$1"
 
-ROOT=`dirname "$0"`
-cd "$ROOT"
-
-rm -rf "$dest_dir"/migrations
-mkdir -p "$dest_dir"/migrations
-cp ../migrations/* "$dest_dir"/migrations/
-cp ../default-db.sqlite "$dest_dir"
+rm -rf "$DEST"/migrations
+mkdir -p "$DEST"/migrations
+cp "$ROOT"/migrations/* "$DEST"/migrations/
+cp "$ROOT"/default-db.sqlite "$DEST"
diff --git a/upcoming-release-notes/893.md b/upcoming-release-notes/893.md
new file mode 100644
index 000000000..d5b7b89e3
--- /dev/null
+++ b/upcoming-release-notes/893.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [j-f1]
+---
+
+Remove usage of `realpath` command in build script
-- 
GitLab