Make auto update working.
This commit is contained in:
parent
878d52ee27
commit
97e30a68ec
3 changed files with 33 additions and 17 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#:use-module (git bindings)
|
||||
#:use-module (git repository)
|
||||
#:use-module (git clone)
|
||||
#:use-module (git checkout)
|
||||
#:use-module (git submodule)
|
||||
#:use-module (rx irregex))
|
||||
|
||||
|
|
@ -70,14 +71,23 @@
|
|||
(define-public repo-update-src
|
||||
(lambda (path)
|
||||
""
|
||||
(submodule-update (submodule-lookup (repository-open path)
|
||||
"autogen"))))
|
||||
(let ((repo (submodule-lookup (repository-open path)
|
||||
"autogen"))
|
||||
(old-cwd (getcwd)))
|
||||
;;Not working for updates only init?
|
||||
;;(submodule-update repo)
|
||||
(system* "/usr/bin/git" "submodule" "update" "autogen")
|
||||
(chdir (string-join (list path "autogen")
|
||||
file-name-separator-string))
|
||||
(system* "/usr/bin/git" "checkout" "main")
|
||||
(chdir old-cwd))))
|
||||
|
||||
;; TODO guile-git method...
|
||||
;; https://stackoverflow.com/questions/572549/difference-between-git-add-a-and-git-add
|
||||
(define-public repo-push-master
|
||||
(lambda ()
|
||||
(lambda (path)
|
||||
""
|
||||
(chdir path)
|
||||
(system* "/usr/bin/git" "add" "-A")
|
||||
(system* "/usr/bin/git" "commit" "-m" "ebuild-autogen update")
|
||||
(system* "/usr/bin/git" "push" "origin" "master")))
|
||||
|
|
@ -107,7 +117,18 @@
|
|||
(list sub-folder file))
|
||||
file-name-separator-string))
|
||||
'()))
|
||||
files))))
|
||||
files)))
|
||||
(finish (lambda ()
|
||||
(if (string-suffix? ".ebuild" file-dst)
|
||||
(system* "ebuild"
|
||||
(string-join (list folder-dst
|
||||
file-dst)
|
||||
file-name-separator-string)
|
||||
"manifest"))
|
||||
(list (string-join (if (string=? sub-folder "")
|
||||
(list file-dst)
|
||||
(list sub-folder file))
|
||||
file-name-separator-string)))))
|
||||
(if (eq? (stat:type (stat file-in)) 'directory)
|
||||
(if (file-exists? file-out)
|
||||
(if (eq? (stat:type (stat file-out)) 'directory)
|
||||
|
|
@ -137,15 +158,9 @@
|
|||
(newline)))
|
||||
(display data-in output-port)
|
||||
(close output-port))
|
||||
(list (string-join (if (string=? sub-folder "")
|
||||
(list file)
|
||||
(list sub-folder file))
|
||||
file-name-separator-string))))
|
||||
(finish)))
|
||||
(copy-file file-in file-out))
|
||||
(list (string-join (if (string=? sub-folder "")
|
||||
(list file)
|
||||
(list sub-folder file))
|
||||
file-name-separator-string)))))))
|
||||
(finish))))))
|
||||
|
||||
(define-public folder-list
|
||||
(lambda (path ignore-meta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue