1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-23 06:50:26 +00:00

Install cook tool when installing janet.

This commit is contained in:
Calvin Rose 2018-12-25 15:39:24 -05:00
parent 17283241ab
commit 6c8da9fe5c
3 changed files with 5 additions and 3 deletions

View File

@ -183,6 +183,8 @@ install: $(JANET_TARGET)
cp $(JANET_HEADERS) $(INCLUDEDIR) cp $(JANET_HEADERS) $(INCLUDEDIR)
mkdir -p $(LIBDIR) mkdir -p $(LIBDIR)
cp $(JANET_LIBRARY) $(LIBDIR)/libjanet.so cp $(JANET_LIBRARY) $(LIBDIR)/libjanet.so
mkdir -p $(JANET_PATH)
cp tools/cook.janet $(JANET_PATH)
cp janet.1 /usr/local/share/man/man1/ cp janet.1 /usr/local/share/man/man1/
mandb mandb
$(LDCONFIG) $(LDCONFIG)

View File

@ -236,7 +236,7 @@
(defmacro try (defmacro try
"Try something and catch errors. Body is any expression, "Try something and catch errors. Body is any expression,
and catch should be a form with the first element a tuple. This tuple and catch should be a form with the first element a tuple. This tuple
should contain a binding for errors and an optional binding for should contain a binding for errors and an optional binding for
the fiber wrapping the body. Returns the result of body if no error, the fiber wrapping the body. Returns the result of body if no error,
or the result of catch if an error." or the result of catch if an error."
[body catch] [body catch]

View File

@ -9,14 +9,14 @@
[& args] [& args]
(print ;args) (print ;args)
(def res (os/shell (string ;args))) (def res (os/shell (string ;args)))
(unless (zero? res) (unless (zero? res)
(print "Error executing command: " ;args) (print "Error executing command: " ;args)
(os/exit res))) (os/exit res)))
(defn- mkdir (defn- mkdir
"Make a directory. Not safe for user code." "Make a directory. Not safe for user code."
[path] [path]
(if is-win (if is-win
(shell "mkdir " path) (shell "mkdir " path)
(shell "mkdir -p " path))) (shell "mkdir -p " path)))