diff --git a/tools/pathnames.lisp b/tools/pathnames.lisp index 4f345d96d16d4f20c35546f50c4eea72aef5ff4a..2309d0a578597ed2300863c6ceafb0e8dc395db7 100644 --- a/tools/pathnames.lisp +++ b/tools/pathnames.lisp @@ -5,11 +5,15 @@ (ensure-pathname (system-relative-pathname :asdf/defsystem ()) :want-physical t :want-absolute t :want-existing t :truename t)) + (defun pn (&rest x) (subpathname *asdf-dir* (and x (uiop:resolve-relative-location x)))) (defun nn (&rest x) (native-namestring (apply 'pn x))) +(defvar *uiop-dir* (pn "uiop/")) +(defvar *build-dir* (pn "build/")) + (defun call-with-asdf-dir (thunk &rest subs) (with-current-directory ((apply 'pn subs)) (funcall thunk))) diff --git a/tools/release.lisp b/tools/release.lisp index cf6ca3b9f4d086cf3f90df3b0e46d1f396bc737d..bb77118bca6fcf8e8911fca65b03e8a60d8a3065 100644 --- a/tools/release.lisp +++ b/tools/release.lisp @@ -59,15 +59,15 @@ (error "Destination ~S already exists, not taking chances - you can delete it yourself." destination)) (ensure-directories-exist destination) - (run `(cp "-pHux" --parents ,@files ,destination) :directory base :show t) - (run `(tar "zcfC" ,tarball ,*build-dir* + (run* `(cp "-pHux" --parents ,@files ,destination) :directory base :show t) + (run* `(tar "zcfC" ,tarball ,*build-dir* ;; TODO: Have better autodetection for which tar is being used, ;; and fall back to no option if not recognized. #+linux (* :owner root :group root) ;; assume GNU tar on Linux. #+darwin (* :uid 0 :gid 0) ;; assume BSD tar on Darwin. (,name /)) :show t) (delete-directory-tree destination :validate #'(lambda (x) (equal x destination))) - (values))) + (success))) (defun uiop-files () "list files in uiop"