forked from josip/eerie
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganised PackageInstaller, added support for SVN and basic depende…
…ncy management
- Loading branch information
Showing
13 changed files
with
180 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
VcsDownloader := Eerie PackageDownloader clone do( | ||
vcs := Object clone do( | ||
git := Object clone do( | ||
check := method(uri, | ||
uri containsSeq("git://") or uri containsSeq(".git")) | ||
|
||
cmd := "git" | ||
download := list("clone #{self uri} #{self path}", "submodule init", "submodule update") | ||
update := list("update", "submodule update") | ||
) | ||
|
||
svn := Object clone do( | ||
check := method(uri, | ||
Eerie sh("svn info " .. uri, false)) | ||
|
||
cmd := "svn" | ||
download := list("co #{self uri} #{self path}") | ||
update := list("up") | ||
) | ||
) | ||
|
||
vcsCmd := method(args, | ||
Eerie sh((self vcs cmd) .. " " .. args)) | ||
|
||
runCommands := method(cmds, | ||
cmds foreach(cmd, | ||
self vcsCmd(cmd interpolate))) | ||
|
||
whichVcs := method(_uri, | ||
self vcs slotNames foreach(name, | ||
self vcs getSlot(name) check(_uri) ifTrue( | ||
return(name))) | ||
|
||
nil) | ||
|
||
canDownload := method(_uri, | ||
self whichVcs(_uri) != nil) | ||
|
||
download := method( | ||
self vcs := self vcs getSlot(self whichVcs(self uri)) | ||
|
||
Directory with(self path) remove | ||
self runCommands(self vcs download)) | ||
|
||
update := method( | ||
self vcs := self vcs getSlot(self whichVcs(self uri)) | ||
self runCommands(self vcs update)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.