Permalink
Browse files

[scripts] allow for .IGNORE files

so that old archives can be skipped rather than having to move them
out of the working directory

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
1 parent 616f146 commit 4fa5a4c728b8e4217956c70d138015314ba9fb01 @hxw hxw committed Aug 29, 2012
Showing with 17 additions and 9 deletions.
  1. +17 −9 scripts/GenerateIndex
View
@@ -26,10 +26,11 @@ exec sbcl --script "$0" "$0" "$@"
(load (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname)))
-(require 'asdf)
-(require 'getopt)
-(require 'md5)
-(require 'cl-json)
+(ql:quickload 'getopt)
+(ql:quickload 'md5)
+(ql:quickload 'cl-json)
+
+
(defvar *program* (second sb-ext:*posix-argv*) "name of this script file")
@@ -180,11 +181,18 @@ exec sbcl --script "$0" "$0" "$@"
(loop for file-path in (sort
(append (directory 7z) (directory arc))
#'string< :key #'namestring)
- collect
- (let ((basename (file-namestring file-path)))
- (when *verbose*
- (format t " File: ~a~%" basename))
- (append (list basename) (md5sum-and-length file-path))))))
+ when
+ (let ((basename (file-namestring file-path))
+ (ignore-file-name (concatenate 'string (namestring file-path) ".IGNORE")))
+ (if (probe-file ignore-file-name)
+ (when *verbose*
+ (format t " Skip: ~a~%" basename)
+ nil)
+ (progn
+ (when *verbose*
+ (format t " File: ~a~%" basename))
+ (append (list basename) (md5sum-and-length file-path)))))
+ collect it)))
(defun partition-files (dir file-list)

0 comments on commit 4fa5a4c

Please sign in to comment.