Make auto update working.
This commit is contained in:
parent
878d52ee27
commit
97e30a68ec
3 changed files with 33 additions and 17 deletions
|
@ -15,7 +15,7 @@ ebuild-autogen. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
m4_define([version_major], [0])
|
||||
m4_define([version_minor], [0])
|
||||
m4_define([version_revision], [0])
|
||||
m4_define([version_revision], [1])
|
||||
|
||||
AC_PACKAGE_URL([http://www.cor.za.net/code/ebuild-autogen])
|
||||
AC_INIT(ebuild-autogen,
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
(synopsis "The verbosity level."))
|
||||
(switch
|
||||
(name 'submodule-update) (default #false) (test boolean?)
|
||||
(synopsis "Fetch update subtree source repo"))
|
||||
(synopsis "Fetch update submodule source repo"))
|
||||
(switch
|
||||
(name 'pkg-clean) (default #false) (test boolean?)
|
||||
(synopsis "Remove packages from repo that's not in autogen subtree."))
|
||||
|
@ -174,7 +174,8 @@ git repository.")
|
|||
""
|
||||
"autogen"
|
||||
"README-repo.org"
|
||||
(option-ref options 'verbosity))
|
||||
(option-ref options 'verbosity)
|
||||
#:file-dst "README.org")
|
||||
(cp-repo-file repo
|
||||
""
|
||||
"autogen"
|
||||
|
@ -318,7 +319,7 @@ git repository.")
|
|||
repo-pkgs)))
|
||||
|
||||
;; Commit and push the updates to master if requested.
|
||||
(if (option-ref options 'repo-push)
|
||||
(repo-push-master))
|
||||
(if (option-ref options 'remote-push)
|
||||
(repo-push-master repo))
|
||||
|
||||
(display "Completed successfully ...") (newline)))))
|
||||
|
|
|
@ -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
Reference in a new issue