Skip to content

Commit

Permalink
Fix variables PEARL_PKGNAME PEARL_PKGREPONAME
Browse files Browse the repository at this point in the history
  • Loading branch information
linkseed committed Jan 14, 2019
1 parent 8edcbfe commit 73ae2ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions boot/emacs/pearl.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

(defun source-config-file (config-file)
(setq pkg-name (replace-regexp-in-string "^.*\/packages\/" "" (replace-regexp-in-string "\/pearl-metadata\/.*$" "" (replace-regexp-in-string "\/pearl-config\/.*$" "" config-file))))
(setq pkg-short-name (replace-regexp-in-string "\/.*$" "" pkg-name))
(setq repo-name (replace-regexp-in-string "^.*\/" "" pkg-name))
(setq pkg-short-name (replace-regexp-in-string "^.*\/" "" pkg-name))
(setq repo-name (replace-regexp-in-string "\/.*$" "" pkg-name))

; To verify that this variable are visible use (getenv "VARNAME") from scratch buffer
(setenv "PEARL_PKGDIR" (concat pearl-home "packages/" pkg-name))
Expand Down
4 changes: 2 additions & 2 deletions boot/vim/pearl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ if isdirectory($PEARL_ROOT) && isdirectory($PEARL_HOME)
for config_path in split(globpath($PEARL_HOME."/packages/*/*/pearl-config", 'config.vim'), "\n")
if filereadable(config_path)
let pkg_name = substitute(substitute(config_path, "^.*\/packages\/", "", ""), "\/pearl-config\/config\.vim$", "", "")
let pkg_short_name = substitute(pkg_name, "\/.*$", "", "")
let repo_name = substitute(pkg_name, "^.*\/", "", "")
let pkg_short_name = substitute(pkg_name, "^.*\/", "", "")
let repo_name = substitute(pkg_name, "\/.*$", "", "")
let $PEARL_PKGVARDIR = $PEARL_HOME.'/var/'.pkg_name
let $PEARL_PKGDIR = $PEARL_HOME.'/packages/'.pkg_name
let $PEARL_PKGNAME = pkg_short_name
Expand Down

0 comments on commit 73ae2ff

Please sign in to comment.