From a3b59aee848fb142a0443b0af6c8f1ee1b39d887 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <karel.koci@nic.cz>
Date: Mon, 25 Feb 2019 15:42:53 +0100
Subject: [PATCH] compile_pkgs: try to fix problem with symlinks

This should consistently expand path to compile_pkgs script no matter if
symbolic link for used or not.
---
 compile_pkgs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compile_pkgs b/compile_pkgs
index f84df5432..16ba45b23 100755
--- a/compile_pkgs
+++ b/compile_pkgs
@@ -28,8 +28,8 @@ _die() {
 }
 
 # Paths to OpenWRT build and turris-build sources
-src_dir="$(readlink -f "$(dirname "$0")")"
-build_dir="$(pwd)"
+src_dir="$(dirname "$(readlink -f "$0")")"
+build_dir="$(readlink -f "$(pwd)")"
 if [ "$build_dir" == "$src_dir" ]; then
 	# Protect against turris-build repository wipe
 	mkdir -p build
-- 
GitLab