1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: update chmod/chdir usages

This commit is contained in:
Alexander Medvednikov
2021-08-28 10:23:01 +03:00
parent 29f550158e
commit f731060caf
7 changed files with 19 additions and 19 deletions

View File

@@ -16,7 +16,7 @@ const vdir = @VEXEROOT
fn main() {
dump(fast_dir)
dump(vdir)
os.chdir(fast_dir)
os.chdir(fast_dir) ?
if !os.exists('$vdir/v') && !os.is_dir('$vdir/vlib') {
println('fast.html generator needs to be located in `v/cmd/tools/fast`')
}
@@ -49,7 +49,7 @@ fn main() {
// println('Checking out ${commit}...')
// exec('git checkout $commit')
println(' Building vprod...')
os.chdir(vdir)
os.chdir(vdir) ?
if os.args.contains('-noprod') {
exec('./v -o vprod cmd/v') // for faster debugging
} else {
@@ -82,7 +82,7 @@ fn main() {
commit_date := exec('git log -n1 --pretty="format:%at" $commit')
date := time.unix(commit_date.int())
//
os.chdir(fast_dir)
os.chdir(fast_dir) ?
mut out := os.create('table.html') ?
// Place the new row on top
html_message := message.replace_each(['<', '&lt;', '>', '&gt;'])
@@ -120,7 +120,7 @@ fn main() {
// Upload the result to github pages
if os.args.contains('-upload') {
println('uploading...')
os.chdir('website')
os.chdir('website') ?
os.execute_or_exit('git checkout gh-pages')
os.cp('../index.html', 'index.html') ?
os.rm('../index.html') ?

View File

@@ -102,7 +102,7 @@ fn (mut a App) collect_info() {
vmodules := os.vmodules_dir()
vexe := os.getenv('VEXE')
vroot := os.dir(vexe)
os.chdir(vroot)
os.chdir(vroot) or {}
a.line('getwd', getwd)
a.line('vmodules', vmodules)
a.line('vroot', vroot)