picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 4276dcb54d7117586275a4807bccccf1bbd05538
parent 85c6f73d659ab49ee6bb5f934832995c70ada207
Author: Alexander Burger <abu@software-lab.de>
Date:   Sat, 13 Jul 2013 15:28:05 +0200

'snapshot' omit 'Max'
Diffstat:
Mlib/too.l | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/too.l b/lib/too.l @@ -2,11 +2,12 @@ # (c) Software Lab. Alexander Burger ### Local Backup ### -(de snapshot (Dst Max . @) - (for N (flip (sort (mapcar format (dir Dst)))) - (if (> N Max) - (call 'rm "-rf" (pack Dst '/ N)) - (call 'mv (pack Dst '/ N) (pack Dst '/ (inc N))) ) ) +(de snapshot (Dst . @) + (for (L (flip (sort (mapcar format (dir Dst)))) L) + (let N (pop 'L) + (call 'mv (pack Dst '/ N) (pack Dst '/ (inc N))) + (when (> (car L) (*/ N 9 10)) + (call 'rm "-rf" (pack Dst '/ (pop 'L))) ) ) ) (when (call 'mkdir (pack Dst "/1")) (while (args) (let