commit 6111f99b28b6c9a20d2e847be55d770bf07ad729 Spenser Truex <truex@equwal.com> 2023-05-26 23:17:11 -0300 Scriptify for sbcl
tag-gen-sbcl.sh | 5 +++++ tag-gen.ros => tag-gen.lisp | 21 +++++++-------------- wrapper/tgen | 7 ------- 3 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/tag-gen-sbcl.sh b/tag-gen-sbcl.sh new file mode 100755 index 0000000..849664e --- /dev/null +++ b/tag-gen-sbcl.sh @@ -0,0 +1,5 @@ +#!/bin/sh +sbcl --load /home/jose/common-lisp/tag-gen/tag-gen.lisp \ + --eval '(tag-gen:main "/home/jose/.config/tag-gen/local.conf" "/usr/bin/exuberant-ctags" 2)' \ + --eval '(tag-gen:main "/home/jose/.config/tag-gen/root.conf" "/usr/bin/exuberant-ctags" 2)' \ + --quit diff --git a/tag-gen.ros b/tag-gen.lisp old mode 100755 new mode 100644 similarity index 88% rename from tag-gen.ros rename to tag-gen.lisp index 2741c69..22bc3ec --- a/tag-gen.ros +++ b/tag-gen.lisp @@ -1,13 +1,3 @@ -#!/bin/sh -#|-*- mode:lisp -*-|# -#| -exec ros -Q -- $0 "$@" -|# -(progn ;;init forms - (ros:ensure-asdf) - #+quicklisp(ql:quickload '() :silent t) - ) - ;;;; Generate etags for a list of files. ;;;; Add a command to cron like: ;;;; 0 0 * * * tag-gen ~/.config/tag-gen/tags.conf @@ -27,9 +17,11 @@ exec ros -Q -- $0 "$@" ;;;; - 1 is for serious errors ;;;; - 2 is for everything -(defpackage :ros.script.tag-gen.3809526563 - (:use :cl)) -(in-package :ros.script.tag-gen.3809526563) +(defpackage :tag-gen + (:use #:cl) + (:export #:main)) + +(in-package :tag-gen) (defvar *log-level* 0) @@ -67,4 +59,5 @@ exec ros -Q -- $0 "$@" (with-open-file (s conf :direction :input) (tag-gen (read s) (uiop:unix-namestring tag-program))))) -;;; vim: set ft=lisp lisp: +; (main "/home/jose/.config/tag-gen/local.conf" "/usr/bin/exuberant-ctags" 2) +; (main "/home/jose/.config/tag-gen/root.conf" "/usr/bin/exuberant-ctags" 2) diff --git a/wrapper/tgen b/wrapper/tgen deleted file mode 100755 index d1f826e..0000000 --- a/wrapper/tgen +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# tag-gen.ros isn't really meant to be used interactively, but it can -# be useful to call it directly when making big changes to a project, -# adding a new one, etc. - -tag-gen.ros /home/username/.config/tag-gen/local.conf /usr/bin/etags 2