Skip to content

Commit

Permalink
3.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
haghish committed Sep 9, 2021
1 parent 1d25969 commit 500f58f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 29 deletions.
41 changes: 15 additions & 26 deletions rcall_check.ado
Original file line number Diff line number Diff line change
Expand Up @@ -56,36 +56,25 @@ Stored results
program rcall_check

syntax [anything] [, Rversion(str) RCALLversion(str)]

// Check rcall version from the rcall.ado
// -------------------------------------------------------------------------
qui local location "`c(pwd)'"
qui cd "`c(sysdir_plus)'"
qui cd r
tempname hitch
file open `hitch' using "rcall.ado", read
file read `hitch' line
while r(eof)==0 & substr(`"`macval(line)'"',1,8) != "Version:" {
file read `hitch' line
}
if substr(trim(`"`macval(line)'"'),1,8) == "Version:" {
local line = substr(`"`macval(line)'"',9,.)
local line : subinstr local line "." " ", all
tokenize "`line'"
local CURRENTRCALLVERSION `1'
macro shift
while !missing("`1'") {
local sub `sub'`1'
macro shift
}
local CURRENTRCALLVERSION `CURRENTRCALLVERSION'.`sub'
}
cap qui cd "`location'"


// Prepare the required rcall version
// -------------------------------------------------------------------------
if !missing("`rcallversion'") {

// Check rcall version from the github version
qui github version rcall
local current `r(version)'
local current : subinstr local current "." " ", all
tokenize `current'
local ver `1'
macro shift
while !missing("`1'") {
local next `next'`1'
macro shift
}
local CURRENTRCALLVERSION `ver'.`next'

// check the required rcall version
local requiredversion `rcallversion'
local requiredversion : subinstr local requiredversion "." " ", all
tokenize `requiredversion'
Expand Down
5 changes: 2 additions & 3 deletions rcallscript.ado
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ program define rcallscript, rclass
}

confirm file `"`using'"'

*rcall vanilla debug: `args' source("`macval(using)'")
rcall: `args' source("`macval(using)'")

rcall `vanilla': `args' source("`macval(using)'")
return add
end

Expand Down

0 comments on commit 500f58f

Please sign in to comment.