Skip to content

Commit ac338e1

Browse files
committed
2.0.5
1 parent 5979b13 commit ac338e1

6 files changed

+31
-8
lines changed

github.pkg

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
v 2.0.0
1+
v 2.0.5
22
d 'GITHUB': github package manager
33
d
44
d search, install, and manage github packages
55
d
6-
d Distribution-Date: 20190531
6+
d Distribution-Date: 20200113
77
d License: MIT
88
d
99
F abspath.ado
@@ -15,6 +15,7 @@ F github.ado
1515
F github.dlg
1616
F github.sthlp
1717
F githubcheck.ado
18+
F githubcheckfilename.ado
1819
F githubconfirm.ado
1920
F githubdb.ado
2021
F githubdependency.ado
@@ -29,7 +30,3 @@ F githuboutput.ado
2930
F githubquery.ado
3031
F githubsearch.ado
3132
F githubsearchsteps.ado
32-
F make.ado
33-
F make.dlg
34-
F make.sthlp
35-
F makedlg.ado

githubcheckfilename.ado

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*cap prog drop githubcheckfilename
2+
3+
program githubcheckfilename
4+
5+
version 13
6+
7+
syntax anything [, filename(str)]
8+
9+
//check whether the filename exists in other packages
10+
preserve
11+
sysuse githubfiles.dta, clear
12+
qui gen found = strpos(file, "`filename'")
13+
qui keep if found == 1 & packagename != `anything'
14+
local N = _N
15+
if `N' > 0 {
16+
di as err "{bf:`filename'} is used elsewhere. try: {stata github findfile `filename'}"
17+
}
18+
restore
19+
20+
end

githubfiles.dta

1.64 MB
Binary file not shown.

make.ado

+6
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ prog make
210210
forval m = 1/`start' {
211211
local n : di files[`m']
212212
file write `pkgfile' `"F `n'"' _n
213+
214+
//check whether the file is unique
215+
githubcheckfilename "`anything'", filename("`n'")
213216
}
214217
restore
215218
}
@@ -219,6 +222,9 @@ prog make
219222
while !missing("`1'") {
220223
if "`1'" != ";" {
221224
file write `pkgfile' `"f `1'"' _n
225+
226+
//check whether the file is unique
227+
githubcheckfilename "`anything'", filename("`n'")
222228
}
223229
macro shift
224230
}

make.do

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make github, replace toc pkg version(2.0.5) ///
1717
"githubdb.ado;githubdependency.ado;githubfiles.dta;" ///
1818
"githubhot.ado;githublistpack.ado;githublistpack.sthlp;" ///
1919
"githuboutput.ado;githubquery.ado;githubsearch.ado;" ///
20-
"githubmake.ado;githubsearchsteps.ado;") ///
20+
"githubmake.ado;githubsearchsteps.ado;githubcheckfilename.ado") ///
2121
ancillary("")
2222

2323

stata.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v 2.0.0
1+
v 2.0.5
22
d Materials by E. F. Haghish
33
d University of Göttingen
44

0 commit comments

Comments
 (0)