Skip to content

Commit

Permalink
Makefile: handle creation of the ~/org-roam link
Browse files Browse the repository at this point in the history
  • Loading branch information
BostX committed Nov 7, 2023
1 parent 0dc63df commit fa0891e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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} || :
Expand Down
5 changes: 1 addition & 4 deletions main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fa0891e

Please sign in to comment.