Reputation: 7863
I have some script and I have no idea what it is doing, will be happy if somebody will explain me:
#!/bin/tcsh
if (-d test) then
svn up test
else
svn checkout http:some address test
endif
cd tests
python test_some.py $argv
P.S can't find info about functions cd and svn
thanks in advance for any help
Upvotes: 0
Views: 63
Reputation: 146043
This script runs a python program which appears to run some tests. The script understands that the test directory is stored in a subversion repository.
I'm a bit confused about one thing. It checks out "test" but then changes its directory to "tests". So either there is a transcription error in the original post or something slightly more complex is going on, like, it somehow assumes that tests exists but not test.
Upvotes: 1
Reputation: 337
cd, and svn, and python are executable names. cd is the command for changing current directory. svn is the command (executable name) for Subversion source control system. python is the Python language interpreter.
Upvotes: 0
Reputation: 26743
The script does the following:
if the test folder exists
update it through subversion
else
check it out from subversion repository
go into the tests directory // interestingly enough, it doesn't match the checked out directory name?
run the test_some.py python file, passing the script arguments.
Upvotes: 0
Reputation: 32576
cd
is the "Change Directory" command.
svn
is a source code repository client.
Upvotes: 0