Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 34 lines (30 sloc) 0.844 kB
f4d2a1b @gvalkov Fix portability problem with #!/usr/bin/env (issue #203)
gvalkov authored
1 #!/bin/sh
2 :;exec emacs --script "$0" "$@"
aa6be4b @milkypostman add a migrate script
authored
3
4 (defun read-from-file (file-name)
5 "read one lisp expression from a file"
6 (cond
7 ((file-exists-p file-name)
8 (with-temp-buffer
9 (insert-file-contents-literally file-name)
10 (goto-char (point-min))
11 (car
12 (read-from-string
13 (buffer-substring-no-properties (point-min) (point-max))))))))
14
15 (message (prin1-to-string command-line-args-left))
4c1b957 @milkypostman migrate takes multiple files
authored
16 (defun process-one (file-name)
17 (let ((config
18 (read-from-file
794bbd0 @milkypostman update migrate script to ignore summary
authored
19 (expand-file-name ".config" (expand-file-name file-name "epkgs")))))
aa6be4b @milkypostman add a migrate script
authored
20 (princ
21 (pp-to-string
22 (cons
23 (intern file-name)
24 (plist-put
25 (plist-put
794bbd0 @milkypostman update migrate script to ignore summary
authored
26 nil
aa6be4b @milkypostman add a migrate script
authored
27 :url
28 (plist-get config :url))
29 :fetcher
30 (plist-get config :fetcher)))
31 ))))
4c1b957 @milkypostman migrate takes multiple files
authored
32
33 (mapc 'process-one command-line-args-left)
Something went wrong with that request. Please try again.