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:
parent
17283241ab
commit
6c8da9fe5c
2
Makefile
2
Makefile
@ -183,6 +183,8 @@ install: $(JANET_TARGET)
|
||||
cp $(JANET_HEADERS) $(INCLUDEDIR)
|
||||
mkdir -p $(LIBDIR)
|
||||
cp $(JANET_LIBRARY) $(LIBDIR)/libjanet.so
|
||||
mkdir -p $(JANET_PATH)
|
||||
cp tools/cook.janet $(JANET_PATH)
|
||||
cp janet.1 /usr/local/share/man/man1/
|
||||
mandb
|
||||
$(LDCONFIG)
|
||||
|
@ -236,7 +236,7 @@
|
||||
(defmacro try
|
||||
"Try something and catch errors. Body is any expression,
|
||||
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,
|
||||
or the result of catch if an error."
|
||||
[body catch]
|
||||
|
@ -9,14 +9,14 @@
|
||||
[& args]
|
||||
(print ;args)
|
||||
(def res (os/shell (string ;args)))
|
||||
(unless (zero? res)
|
||||
(unless (zero? res)
|
||||
(print "Error executing command: " ;args)
|
||||
(os/exit res)))
|
||||
|
||||
(defn- mkdir
|
||||
"Make a directory. Not safe for user code."
|
||||
[path]
|
||||
(if is-win
|
||||
(if is-win
|
||||
(shell "mkdir " path)
|
||||
(shell "mkdir -p " path)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user