From 540fd3e236331fa0974b43e3556996d0d30bd75c Mon Sep 17 00:00:00 2001 From: SANO Masatoshi Date: Sat, 24 Dec 2016 10:43:10 +0900 Subject: [PATCH] shorten --- lisp/delete.ros | 2 +- lisp/dump.ros | 2 +- lisp/install+ffcall.lisp | 2 +- lisp/install+sigsegv.lisp | 2 +- lisp/install-abcl-bin.lisp | 2 +- lisp/install-clisp.lisp | 10 +++++----- lisp/install-ecl.lisp | 4 ++-- lisp/install-sbcl.lisp | 8 ++++---- lisp/install-slime.lisp | 2 +- lisp/list-dump.lisp | 2 +- lisp/list.ros | 2 +- lisp/patch-quicklisp.lisp | 2 +- lisp/run.ros | 10 +++++----- lisp/util-use.lisp | 2 +- lisp/util.lisp | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lisp/delete.ros b/lisp/delete.ros index 5b7118d..5316440 100644 --- a/lisp/delete.ros +++ b/lisp/delete.ros @@ -49,7 +49,7 @@ exec ros -Q -m roswell -L sbcl-bin -- $0 "$@" (ros:roswell '("list" "installed") *standard-output*)) ((equal (first r) "dump") (delete-dump (rest r))) - ((let ((func (ros.util:module "delete" (first r)))) + ((let ((func (module "delete" (first r)))) (when func (apply func (rest r))))) (t diff --git a/lisp/dump.ros b/lisp/dump.ros index 9b3c59c..c96f402 100644 --- a/lisp/dump.ros +++ b/lisp/dump.ros @@ -44,7 +44,7 @@ exec ros -- $0 "$@" (if (> (length params) 1) (%dump (second params)) (format *error-output* "Missing the pathname for an image.~%"))) - (t (let ((path (merge-pathnames (format nil "~A.~A" (first params) (ros.util:core-extention)) + (t (let ((path (merge-pathnames (format nil "~A.~A" (first params) (core-extention)) (dump-dir)))) (%dump (ensure-directories-exist path) :normal)))))) diff --git a/lisp/install+ffcall.lisp b/lisp/install+ffcall.lisp index 8be03ae..2d8a462 100644 --- a/lisp/install+ffcall.lisp +++ b/lisp/install+ffcall.lisp @@ -27,7 +27,7 @@ (let* ((cmd (format nil "./configure '--prefix=~A'" (ensure-directories-exist(merge-pathnames (format nil "lib/~A/~A/~A/~A/" (uname-m) (uname) "ffcall" *ffcall-version*) (homedir))))) (*standard-output* (make-broadcast-stream out #+sbcl(make-instance 'count-line-stream)))) - (ros.util:chdir expand-dir) + (chdir expand-dir) (uiop/run-program:run-program cmd :output t :ignore-error-status t))) (format t "~&make~%") (with-open-file (out (ensure-directories-exist diff --git a/lisp/install+sigsegv.lisp b/lisp/install+sigsegv.lisp index 85419a1..6b9d784 100644 --- a/lisp/install+sigsegv.lisp +++ b/lisp/install+sigsegv.lisp @@ -28,7 +28,7 @@ (let* ((cmd (format nil "./configure '--prefix=~A'" (ensure-directories-exist(merge-pathnames (format nil "lib/~A/~A/~A/~A/" (uname-m) (uname) "sigsegv" *sigsegv-version*) (homedir))))) (*standard-output* (make-broadcast-stream out #+sbcl(make-instance 'count-line-stream)))) - (ros.util:chdir expand-dir) + (chdir expand-dir) (uiop/run-program:run-program cmd :output t :ignore-error-status t))) (format t "~&make~%") (with-open-file (out (ensure-directories-exist diff --git a/lisp/install-abcl-bin.lisp b/lisp/install-abcl-bin.lisp index 71c7f3c..68afa21 100644 --- a/lisp/install-abcl-bin.lisp +++ b/lisp/install-abcl-bin.lisp @@ -51,7 +51,7 @@ (cons t argv)) (defun abcl-bin-script (argv) - (let ((java (ros.util:which "java")) + (let ((java (which "java")) (dir (merge-pathnames (format nil "~A/" (opt "as")) (abcl-bin-impl)))) (unless java (format *error-output* "Error: JAVA wasn't found in the path. 'ros use abcl' will fail.~%") diff --git a/lisp/install-clisp.lisp b/lisp/install-clisp.lisp index a4988fd..3105046 100644 --- a/lisp/install-clisp.lisp +++ b/lisp/install-clisp.lisp @@ -55,7 +55,7 @@ (uri (clisp-patch1-uri))) (format t "~&Downloading patch: ~A~%" uri) (download uri file) - (ros.util:chdir (opt "src")) + (chdir (opt "src")) (format t "~%Applying patch:~%") (uiop/run-program:run-program (format nil "git apply ~A" file) :output t)) (cons t argv)) @@ -76,7 +76,7 @@ "") (opt "prefix"))) (*standard-output* (make-broadcast-stream out #+sbcl(make-instance 'count-line-stream)))) - (ros.util:chdir src) + (chdir src) (uiop/run-program:run-program cmd :output t :ignore-error-status t))) (cons t argv)) @@ -91,7 +91,7 @@ (let* ((src (namestring (namestring (merge-pathnames "src/" (opt "src"))))) (cmd (format nil "ulimit -s 16384 && make")) (*standard-output* (make-broadcast-stream out #+sbcl(make-instance 'count-line-stream)))) - (ros.util:chdir src) + (chdir src) (uiop/run-program:run-program cmd :output t :ignore-error-status t))) (cons t argv)) @@ -103,7 +103,7 @@ (format t "~&prefix: ~s~%" impl-path) (ensure-directories-exist impl-path) (ensure-directories-exist log-path) - (ros.util:chdir src) + (chdir src) (with-open-file (out log-path :direction :output :if-exists :append :if-does-not-exist :create) (format out "~&--~&~A~%" (date)) (let ((*standard-output* (make-broadcast-stream @@ -115,7 +115,7 @@ (defun clisp-clean (argv) (format t "~&Cleaning~%") (let ((src (namestring (merge-pathnames "src/" (opt "src"))))) - (ros.util:chdir src) + (chdir src) (let* ((out (make-broadcast-stream)) (*standard-output* (make-broadcast-stream out #+sbcl(make-instance 'count-line-stream)))) diff --git a/lisp/install-ecl.lisp b/lisp/install-ecl.lisp index dae7cb0..26a1df1 100644 --- a/lisp/install-ecl.lisp +++ b/lisp/install-ecl.lisp @@ -26,9 +26,9 @@ (defun ecl-chdir (argv) (let ((version (ecl-version-filename (getf argv :version)))) (or (ignore-errors - (ros.util:chdir (merge-pathnames (format nil "src/ecl-~A/" version) (homedir)))) + (chdir (merge-pathnames (format nil "src/ecl-~A/" version) (homedir)))) (ignore-errors - (ros.util:chdir (merge-pathnames (format nil "src/mirror-ecl-~A/" version) (homedir))))))) + (chdir (merge-pathnames (format nil "src/mirror-ecl-~A/" version) (homedir))))))) (defun ecl-argv-parse (argv) (let ((pos (position "--as" (getf argv :argv) :test 'equal))) diff --git a/lisp/install-sbcl.lisp b/lisp/install-sbcl.lisp index c723abb..929ef89 100644 --- a/lisp/install-sbcl.lisp +++ b/lisp/install-sbcl.lisp @@ -116,7 +116,7 @@ #+linux (sbcl-patch2-uri))) (format t "~&Downloading patch: ~A~%" uri) (download uri file) - (ros.util:chdir (opt "src")) + (chdir (opt "src")) (format t "~%Applying patch:~%") (uiop/run-program:run-program "patch -p0 -N" :output t :input file :ignore-error-status t)))) (cons t argv)) @@ -159,7 +159,7 @@ #-win32 'identity (opt "prefix")))))) (*standard-output* (make-broadcast-stream out #+sbcl(make-instance 'count-line-stream)))) - (ros.util:chdir src) + (chdir src) (format t "~&~S~%" cmd) (uiop/run-program:run-program cmd :output t :ignore-error-status nil))) (cons t argv)) @@ -174,7 +174,7 @@ (format t "~&prefix: ~s~%" impl-path) (ensure-directories-exist impl-path) (ensure-directories-exist log-path) - (ros.util:chdir src) + (chdir src) (ros:unsetenv "SBCL_HOME") (ros:setenv "INSTALL_ROOT" (format nil "~A" install-root)) (with-open-file (out log-path :direction :output :if-exists :append :if-does-not-exist :create) @@ -283,7 +283,7 @@ (defun sbcl-clean (argv) (format t "~&Cleaning~%") (let ((src (opt "src"))) - (ros.util:chdir src) + (chdir src) (let* ((out (make-broadcast-stream)) (*standard-output* (make-broadcast-stream out #+sbcl(make-instance 'count-line-stream)))) diff --git a/lisp/install-slime.lisp b/lisp/install-slime.lisp index 8e8aab0..3cf7879 100644 --- a/lisp/install-slime.lisp +++ b/lisp/install-slime.lisp @@ -25,7 +25,7 @@ (end (position #\/ str :from-end t)) (end2 (position #\. str :from-end t)) (start (position #\/ str :from-end t :end end))) - (ros.util:clone-github + (clone-github (subseq str (1+ start) end) (subseq str (1+ end) end2) :path "lisp/slime" :branch (format nil "v~A" name) :alias name)) diff --git a/lisp/list-dump.lisp b/lisp/list-dump.lisp index 9b72904..a9efce2 100644 --- a/lisp/list-dump.lisp +++ b/lisp/list-dump.lisp @@ -10,6 +10,6 @@ (format nil "impls/~A/~A/~A/dump/" (uname-m) (uname) impl) (homedir)) for i in (directory (make-pathname :name :wild - :type (ros.util:core-extention impl) + :type (core-extention impl) :defaults path)) do (format t "~A~%" (pathname-name i)))) diff --git a/lisp/list.ros b/lisp/list.ros index fc45bc3..4b4c2cc 100644 --- a/lisp/list.ros +++ b/lisp/list.ros @@ -26,7 +26,7 @@ exec ros +Q -m roswell -L sbcl-bin -- $0 "$@" when (ignore-errors (string-equal "roswell.list." x :end2 13)) collect (subseq x 13)) #'string<))) - (let ((func (ros.util:module "list" (first r)))) + (let ((func (module "list" (first r)))) (if func (apply func (rest r)) (format *error-output* "not suppported type for list~%"))))) diff --git a/lisp/patch-quicklisp.lisp b/lisp/patch-quicklisp.lisp index cc8a9fa..6795b40 100644 --- a/lisp/patch-quicklisp.lisp +++ b/lisp/patch-quicklisp.lisp @@ -28,7 +28,7 @@ (format nil "impls/~A/windows/7za/9.20/7za.exe" (ros:roswell '("roswell-internal-use" "uname" "-m") :string T)) - (ros.util:homedir)))) + (homedir)))) (defmethod install ((release release)) (let ((archive (ensure-local-archive-file release)) (output diff --git a/lisp/run.ros b/lisp/run.ros index ddd8f3c..bd2556e 100644 --- a/lisp/run.ros +++ b/lisp/run.ros @@ -5,10 +5,10 @@ exec ros -Q -m roswell -L sbcl-bin -- $0 "$@" |# (progn - ) + (ros:include "util")) (defpackage :ros.script.run.3668210999 - (:use :cl)) + (:use :cl :ros.util)) (in-package :ros.script.run.3668210999) (defun main (system script verbose &rest rest) @@ -16,10 +16,10 @@ exec ros -Q -m roswell -L sbcl-bin -- $0 "$@" (version (subseq system (1+ pos))) (system% (subseq system 0 pos)) (verbose (parse-integer verbose :junk-allowed t)) - (func (ros.util:module "run" system%))) + (func (module "run" system%))) (declare (ignorable version verbose)) - (ros.util:set-opt "impl" system) - (ros.util:set-opt "verbose" (format nil "~A" verbose)) + (set-opt "impl" system) + (set-opt "verbose" (format nil "~A" verbose)) (if func (funcall func script rest) (format *error-output* "not supported impl:~A~%" system)))) diff --git a/lisp/util-use.lisp b/lisp/util-use.lisp index 91beb3b..049d2cb 100644 --- a/lisp/util-use.lisp +++ b/lisp/util-use.lisp @@ -20,5 +20,5 @@ (setf (config "default.lisp") lisp))) t) - (t (let ((func (ros.util:module "use" lisp))) + (t (let ((func (module "use" lisp))) (funcall func version)))))) diff --git a/lisp/util.lisp b/lisp/util.lisp index a4ba0fd..4e0676f 100644 --- a/lisp/util.lisp +++ b/lisp/util.lisp @@ -129,7 +129,7 @@ ccl-bin -> (\"ccl-bin\" nil) (defun clone-github (owner name &key (alias (format nil "~A/~A" owner name)) (path "templates") branch) (format *error-output* "install from github ~A/~A~%" owner name) - (if (ros.util:which "git") + (if (which "git") (let ((dir (merge-pathnames (format nil "~A/~A/" path alias) (homedir)))) (setq branch (if branch (format nil "-b ~A" branch) "")) (if (funcall (intern (string :probe-file*) :uiop) dir)