scripts: use :flag, not :counter, and fix running files

This commit is contained in:
vindarel 2023-03-08 16:49:45 +01:00
parent d6588d08cd
commit 2c93b1576c
3 changed files with 17 additions and 13 deletions

10
src/scripts/simpleHTTPserver.lisp Normal file → Executable file
View file

@ -2,7 +2,10 @@
;;; Run with:
;;; $ ciel -s simpleHTTPserver 4242
;;;
;;; or add a shebang line and make this script executable.
;;; or add a shebang line and make this script executable:
;; #!/usr/bin/env ciel
;; =>
;; $ ./simpleHTTPserver.lisp
;;;
(in-package :ciel-user)
@ -32,8 +35,9 @@
(file-namestring path)
;; How to simply get the directory name, not full path?
;; pathname-directory -> (:relative "path" "to" "dir")
(str:ensure-ends-with "/"
(first (last (pathname-directory path))))))
;; TODO: this is not yet merged in cl-str, sorry.
(str:ensure-end "/"
(first (last (pathname-directory path))))))
(defun show-file-list (file-list &key title)
(with-page (:title title)