summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2013-10-29 19:58:21 +0100
committerPeter Bex <peter@more-magic.net>2013-10-29 19:58:21 +0100
commit629c45620fa23241a51594a68c80c9788f95d9b5 (patch)
treed4dbbf6e3fdad22d680a4148ed3b535209e7c56c
parent3baf848081f76188093f5afa84dca610bd9e1925 (diff)
downloadhenrietta-cache-629c45620fa23241a51594a68c80c9788f95d9b5.tar.gz
Fix pax_global_header problem0.4.1
-rw-r--r--henrietta-cache.scm11
-rw-r--r--henrietta-cache.setup2
2 files changed, 9 insertions, 4 deletions
diff --git a/henrietta-cache.scm b/henrietta-cache.scm
index 58d7f90..e5311b2 100644
--- a/henrietta-cache.scm
+++ b/henrietta-cache.scm
@@ -143,9 +143,14 @@ EOF
;; Some people extract to the current directory, some include the
;; directory
(let* ((contents (directory tmp-dir))
- (contents-dir (if (= 1 (length contents))
- (make-pathname tmp-dir (car contents))
- tmp-dir))
+ (contents-dir (match contents
+ ;; Silly pax archives contain this bogus entry.
+ ;; Some pax-aware tar(1)s skip it, others don't.
+ ((or (dir "pax_global_header")
+ ("pax_global_header" dir)
+ (dir))
+ (make-pathname tmp-dir dir))
+ (else tmp-dir)))
(cmd (sprintf "mv ~A/* ~A" (qs contents-dir) (qs cache-dir)))
(status (system cmd)))
(unless (zero? status)
diff --git a/henrietta-cache.setup b/henrietta-cache.setup
index f40a64f..7dcf31a 100644
--- a/henrietta-cache.setup
+++ b/henrietta-cache.setup
@@ -5,4 +5,4 @@
(install-program
'henrietta-cache
'("henrietta-cache")
- '((version "0.4")))
+ '((version "0.4.1")))