From fa0891e6064cd26abb77558b76bd50a86786d6c3 Mon Sep 17 00:00:00 2001 From: Rostislav Svoboda Date: Tue, 7 Nov 2023 15:54:57 +0100 Subject: [PATCH] Makefile: handle creation of the ~/org-roam link --- Makefile | 2 ++ main.rkt | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2daa8e6..8c8f2da 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,10 @@ # the 'export' seems not to be necessary $(eval isGuix := $(shell command -v guix > /dev/null 2>&1 && echo t || echo f)) $(eval destDir := $(shell [ "${isGuix}" = t ] && echo $${dotf}/bin || echo ~/bin)) +orgRoamLink := ${HOME}/org-roam all: show-environment clean install-deps + [ ! -L "${orgRoamLink}" ] && ln -s ${dev}/notes/notes "${orgRoamLink}" || : [ ! -d ${destDir} ] && mkdir ${destDir} || : raco exe -o ${destDir}/search-notes main.rkt [ "${isGuix}" = t ] && gxhre --cores=${cores} || : diff --git a/main.rkt b/main.rkt index deabd1b..1ade211 100644 --- a/main.rkt +++ b/main.rkt @@ -107,10 +107,7 @@ racket main.rkt -e \"/home/bost/der/search-notes/main.rkt /home/bost/der/search- ;; Thanks to https://stackoverflow.com/q/16266934 for a hint (define namespace (namespace-anchor->namespace a)) - ;; this is the default location of the org-roam directory - ;; ~/org-roam is a symbolic link at the moment: - ;; $ ls -l ~/org-roam - ;; [...] /home/bost/org-roam -> /home/bost/dev/notes/notes + ;; This is the default location of the org-roam directory. See Makefile (define dir (format "~a/org-roam/" (getenv "HOME"))) (define add-src-location-info #f)