-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cfc32d2
Showing
9 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/*.asd | ||
**/*.fasl | ||
steelcut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.PHONY: clean install test | ||
|
||
steelcut: src/*.lisp | ||
./build.sh | ||
|
||
test: | ||
./test.sh | ||
|
||
clean: | ||
rm -rf steelcut | ||
|
||
install: steelcut | ||
test -n "$(BINDIR)" # $$BINDIR | ||
cp steelcut ${BINDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
# Adapted from | ||
# https://github.com/cicakhq/potato/blob/master/tools/build_binary.sh; | ||
# Quicklisp path hack from | ||
# https://www.darkchestnut.com/2016/quicklisp-load-personal-projects-from-arbitrary-locations/ | ||
|
||
sbcl --non-interactive \ | ||
--disable-debugger \ | ||
--eval '(pushnew (truename ".") ql:*local-project-directories*)' \ | ||
--eval '(ql:register-local-projects)' \ | ||
--eval '(ql:quickload :steelcut)' \ | ||
--eval '(progn (sb-ext:disable-debugger) (sb-ext:save-lisp-and-die "steelcut" :toplevel #'"'"'steelcut:main :executable t))' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
(in-package #:steelcut) | ||
|
||
(defun lisp-home () (uiop:getenv "LISP_HOME")) | ||
|
||
(defun str (&rest args) | ||
(format nil "~{~a~}" args)) | ||
|
||
(defun project-path (projname) | ||
(str (lisp-home) "/" projname)) | ||
|
||
(defun find-project (projname) | ||
(uiop:probe-file* (project-path projname))) | ||
|
||
(find-project "steelcut") | ||
(find-project "steelcutter") | ||
|
||
(project-path "steelcut") | ||
|
||
(defun make-project (projname) | ||
(ensure-directories-exist (str (project-path projname) "/"))) | ||
|
||
(make-project "foo") | ||
(project-path "foo") | ||
(find-project "foo") | ||
(find-project "food") | ||
|
||
(defun destroy-project!!! (projname) | ||
(fad:delete-directory-and-files (project-path projname))) | ||
|
||
(destroy-project!!! "foo") | ||
(find-project "foo") | ||
|
||
(defun main () | ||
(format t "Thanks for using steelcut!~%")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(defpackage steelcut | ||
(:use :cl :arrows :cl-fad) | ||
(:export :main)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
steelcut.asd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
# Adapted from | ||
# https://github.com/cicakhq/potato/blob/master/tools/build_binary.sh; | ||
# Quicklisp path hack from | ||
# https://www.darkchestnut.com/2016/quicklisp-load-personal-projects-from-arbitrary-locations/ | ||
|
||
sbcl --non-interactive \ | ||
--disable-debugger \ | ||
--eval '(pushnew (truename ".") ql:*local-project-directories*)' \ | ||
--eval '(ql:register-local-projects)' \ | ||
--eval '(ql:quickload :1AM)' \ | ||
--eval '(ql:quickload :steelcut)' \ | ||
--eval '(asdf:test-system :steelcut/test)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(defpackage :steelcut.test | ||
(:use :cl :1am) | ||
(:export :run-tests)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(in-package #:steelcut.test) | ||
|
||
(defun run-tests () (1am:run)) | ||
|
||
(test example | ||
(is (equal 2 (+ 1 1)))) |