Skip to content

Commit

Permalink
2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
haghish committed Jan 13, 2020
1 parent 5979b13 commit ac338e1
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
9 changes: 3 additions & 6 deletions github.pkg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
v 2.0.0
v 2.0.5
d 'GITHUB': github package manager
d
d search, install, and manage github packages
d
d Distribution-Date: 20190531
d Distribution-Date: 20200113
d License: MIT
d
F abspath.ado
Expand All @@ -15,6 +15,7 @@ F github.ado
F github.dlg
F github.sthlp
F githubcheck.ado
F githubcheckfilename.ado
F githubconfirm.ado
F githubdb.ado
F githubdependency.ado
Expand All @@ -29,7 +30,3 @@ F githuboutput.ado
F githubquery.ado
F githubsearch.ado
F githubsearchsteps.ado
F make.ado
F make.dlg
F make.sthlp
F makedlg.ado
20 changes: 20 additions & 0 deletions githubcheckfilename.ado
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*cap prog drop githubcheckfilename

program githubcheckfilename

version 13

syntax anything [, filename(str)]

//check whether the filename exists in other packages
preserve
sysuse githubfiles.dta, clear
qui gen found = strpos(file, "`filename'")
qui keep if found == 1 & packagename != `anything'
local N = _N
if `N' > 0 {
di as err "{bf:`filename'} is used elsewhere. try: {stata github findfile `filename'}"
}
restore

end
Binary file modified githubfiles.dta
Binary file not shown.
6 changes: 6 additions & 0 deletions make.ado
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ prog make
forval m = 1/`start' {
local n : di files[`m']
file write `pkgfile' `"F `n'"' _n

//check whether the file is unique
githubcheckfilename "`anything'", filename("`n'")
}
restore
}
Expand All @@ -219,6 +222,9 @@ prog make
while !missing("`1'") {
if "`1'" != ";" {
file write `pkgfile' `"f `1'"' _n

//check whether the file is unique
githubcheckfilename "`anything'", filename("`n'")
}
macro shift
}
Expand Down
2 changes: 1 addition & 1 deletion make.do
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ make github, replace toc pkg version(2.0.5) ///
"githubdb.ado;githubdependency.ado;githubfiles.dta;" ///
"githubhot.ado;githublistpack.ado;githublistpack.sthlp;" ///
"githuboutput.ado;githubquery.ado;githubsearch.ado;" ///
"githubmake.ado;githubsearchsteps.ado;") ///
"githubmake.ado;githubsearchsteps.ado;githubcheckfilename.ado") ///
ancillary("")


Expand Down
2 changes: 1 addition & 1 deletion stata.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v 2.0.0
v 2.0.5
d Materials by E. F. Haghish
d University of Göttingen
d haghish@med.uni-goettingen.de
Expand Down

0 comments on commit ac338e1

Please sign in to comment.