salmonella-run-publish --depth added by siiky on Wed Apr 7 00:47:54 2021

diff --git a/salmonella-run-publish.scm b/salmonella-run-publish.scm
index 932382b..34c7f9d 100644
--- a/salmonella-run-publish.scm
+++ b/salmonella-run-publish.scm
@@ -282,22 +282,22 @@

       ;; Get the most recent version of the chicken-core source code
       (unless (chicken-source-dir)
-        (if (file-exists? chicken-core-dir)
-            (begin
-              (! "git" '(fetch --all) dir: chicken-core-dir)
-              (! "git" `(checkout ,(chicken-core-branch)) dir: chicken-core-dir)
-              (! "git" '(pull) dir: chicken-core-dir)
-              (! "git" '(clean -f) dir: chicken-core-dir)
-              (! "git" '(checkout -f) dir: chicken-core-dir))
-            (let ((clone-args
-                   (append
-                    `(clone
-                      ,(chicken-core-git-uri)
-                      --branch ,(chicken-core-branch))
-                    (if (git-clone-depth)
-                        `(--depth ,(git-clone-depth))
-                        '()))))
-              (! "git" clone-args dir: (tmp-dir)))))
+       (let ((depth-arg (if (git-clone-depth)
+                            `(--depth ,(git-clone-depth))
+                            '())))
+         (if (file-exists? chicken-core-dir)
+             (begin
+               (! "git" '(fetch --all ,@depth-arg) dir: chicken-core-dir)
+               (! "git" `(checkout ,(chicken-core-branch)) dir: chicken-core-dir)
+               (! "git" '(pull ,@depth-arg) dir: chicken-core-dir)
+               (! "git" '(clean -f) dir: chicken-core-dir)
+               (! "git" '(checkout -f) dir: chicken-core-dir))
+             (let ((clone-args
+                     `(clone
+                        ,(chicken-core-git-uri)
+                        --branch ,(chicken-core-branch)
+                        ,@depth-arg)))
+               (! "git" clone-args dir: (tmp-dir))))))

       ((before-make-bootstrap-hook) chicken-core-dir)