Fix upload hook location
[tt.git] / tt.rkt
diff --git a/tt.rkt b/tt.rkt
index a375c69..a893c78 100644 (file)
--- a/tt.rkt
+++ b/tt.rkt
                (log-debug "Last-Modified <= current skipping the rest of ~v" u-str)
                #t))))
   (if (not cached?)
-    (begin
-      (log-debug
-        "Downloading the rest of ~v. ETag: ~a, Last-Modified: ~v"
-        u-str etag lmod)
-      (make-parent-directory* cached-object-path)
-      (make-parent-directory* cached-etag-path)
-      (make-parent-directory* cached-lmod-path)
-      (call-with-output-file cached-object-path
-                             (curry copy-port body-input)
-                             #:exists 'replace)
-      (when etag
-        (display-to-file etag cached-etag-path #:exists 'replace))
-      (when lmod
-        (display-to-file lmod cached-lmod-path #:exists 'replace))
-      'downloaded-new)
-    'skipped-cached))
+      (begin
+        (log-debug
+          "Downloading the rest of ~v. ETag: ~a, Last-Modified: ~v"
+          u-str etag lmod)
+        (make-parent-directory* cached-object-path)
+        (make-parent-directory* cached-etag-path)
+        (make-parent-directory* cached-lmod-path)
+        (call-with-output-file cached-object-path
+                               (curry copy-port body-input)
+                               #:exists 'replace)
+        (when etag
+          (display-to-file etag cached-etag-path #:exists 'replace))
+        (when lmod
+          (display-to-file lmod cached-lmod-path #:exists 'replace))
+        'downloaded-new)
+      'skipped-cached))
 
 (: uri-download
    (-> Positive-Float Url
       "r, read     : Read the timeline (offline operation)."
       "d, download : Download the timeline."
       ; TODO Add path dynamically
-      "u, upload   : Upload your twtxt file (alias to execute ~/.tt/upload)."
+      "u, upload   : Upload your twtxt file (alias to execute ~/.tt/hooks/upload)."
       "c, crawl    : Discover new peers mentioned by known peers (offline operation)."
       ""
       #:args (command . args)
            #:program
            "tt upload"
            #:args ()
-           (if (system (path->string (build-path tt-home-dir "upload")))
+           (if (system (path->string (build-path tt-home-dir "hooks" "upload")))
                (exit 0)
                (exit 1)))]
         [(or "r" "read")
This page took 0.02772 seconds and 4 git commands to generate.