I have a checked out a module. It's in /home/user/repositories/repository.
I want to export a folder inside this module. Suppose it's folder3.
/home/user/repositories/repository/folder1/folder2/folder3/
I get into
/home/user/repositories/repository/folder1/folder2/
and try to run
cvs export -r MYTAG -d MY_DIR folder3
But it doesn't work. I get:
-f server: cannot find module `folder3' - ignored
cvs [export aborted]: cannot expand modules
It's possible to export a folder inside a module inside Eclipse, or other visual editors. Which command they call do to it? Is it possible to "log" the executed command in visual editors?
Do I have to write the full path to export it, or does exist an alternative? What am I doing wrong? This can't be so difficult, I just want to export an specific folder from a cvs module using command line...
My bad. I can export a tag that tagged a folder inside my module, using
cvs -d :pserver:user#localhost:2401/opt/cvs/ -q export -rProducts-250 -d Products-250 repository/folder1/folder2/folder3/
Related
I just need to run jsdoc on ai whole directory containing .js files, I am doing this on individual files in ubuntu terminal by issuing command jsdoc abc.js but what I need is to apply this command on all files in the directory at once,so that all files in that directory containg js files would be generated by a single command. Thanks for any help you would give.
You can go recursive by passing -r parameter:
$ jsdoc -r .
Even though it's only asked how to run JSDoc for a specific directory, I think this thread could use some more information so people reading this can be aware of other strategies that could be useful.
Running JSDoc for a specific directory
This is the simplest one and the direct answer to the question. You can run JSDoc for all files inside a directory using the --recurse or -r option.
Example:
$ jsdoc -r ./src/
This will run JSDoc for all files inside the src/ directory and its subdirectories.
Running JSDoc for multiple directories
This and the following sections aren't exactly what the question asked for but hopefully will be useful for people using a search engine that found this thread.
You'll probably need to run JSDoc for all the files located in different directories. For this you can just use multiple arguments with the --recurse option.
Example:
$ jsdoc -r ./client/ ./server/
This will run JSDoc for all files inside both client/ and server/ and its subdirectories.
NOT running JSDoc for some directories
This is slightly more complicated and will require use of JSDoc's configuration file. After creating the configuration file, you can run JSDoc using the --configure (or -c) option to select the configuration file you want to use.
Example:
Create a file conf.json as shown bellow:
{
"source": {
"include": [ "." ],
"exclude": [ "node_modules/" ]
}
}
Then run JSDoc like that:
jsdoc -c ./conf.json -r
With that JSDoc will be run for all files inside your current directory and its subdirectories except for the ones located inside node_modules/ and its subdirectories.
Sources
For more info on the available options for the jsdoc command see here
For more info on the JSDoc configuration file see here
I have access to the NuGet command-line tool but not to any unzip tools. Is it possible to install a package already saved locally?
After doing a number of searches, I've come up with nothing that handles such a simple requirement. I've also looked at the code but it's far too lengthy/dense to quickly come to a definite conclusion, though, by all indications, it doesn't support the direct install of a local file.
Since it's really just a zip file.
mv ~/path/to/package.nupkg package.zip
This will change the file extension to be a zip file. Then:
unzip package.zip -d ~/Output/dir
If you have the .nupkg stored locally in a directory and all you want to do is extract the files you could use NuGet.exe and do something like:
NuGet.exe install -o extract-directory MyPackageId -source /Full/Path/To/Directory/Containing/NuGet/Package/NuPkgs
The -source parameter allows you to define a new source. In this case the directory where the .nupkg file exists.
The -o parameter defines the directory where you want the NuGet package extracted to.
The above seems to work on the Mac with NuGet 2.12.
Download binary packages on https://www.playframework.com/documentation/2.0/Installing gives me a play-2.0 folder with play exec file. However running play on that same directory using console returns
play: command not found
My environment is MAC and I tried
chmod a+x play
while running into the same problem
Can someone give me a guide on the installation process?
When we run a command, the shell look for this file (command) in a list of directories (folders). This list of directories is stored in a enviroment variable called PATH. If you want to see the values inside PATH. You can run:
echo $PATH
Note that the folders are separated by :.
The problem you are facing is because the shell can't find a dir that contains the file play. This happens because the play's dir is not in PATH
You can add play's dir to your PATH by running
export PATH=$PATH:/path/to/your/play/dir
This is a temporary thing. After you exit your shell session you will loose it. To make it permanent you need to edit the .bash_profile file in your home folder and add this command in the end of the file and save it.
How do I import an external package from scratch?
I've written a library package in Go and testing to distribute through github. I am following http://golang.org/doc/code.html and using mac but getting error message
cmd I put is following.
$ mkdir $HOME/go
$ export GOPATH=$HOME/go
$ export PATH=$PATH:$GOPATH/bin
$ mkdir -p $GOPATH/src/github.com/user
$ mkdir $GOPATH/src/github.com/user/project
Then I put
$ go get github.com/user/project
Still errors with go install
can't load package: package github.com/golingorg/goling: no Go source files in /Users/user_name/go/src/github.com/user/project
I do not understand why we need files to import an external package in Go. External package means that I get something and create files from the external package.
My question is how I import an external package from scratch. Most of documents just say something like
go get github.com/yasushi-saito/fifo_queue
this gives me "$GOPATH not set."
I am getting frustrated setting up the environment for "go get" to work, as a beginner. Thanks a lot in advance.
Summary
How do I import an external package from scratch?
Go is a static type language thus it needs to resolve any reference to external package at compile time. The "go" tool expects the source of external packages in locally accessible path thus you need to use "go get" to download them.
From what you described, you probably did not set the GOPATH. Use ECHO $GOPATH to check if it is set correctly.
For my GO project, I normally use GOPATH as workspace, similar to virtualenv in Python or rbenv/rvm in Ruby. Let say my project "myproject" has root at /projects/myproject, my source file will be located at /projects/myproject/src/myproject and there is an import of "github.com/user/project", then
> cd /projects/myproject
> export GOPATH=`pwd` # or export GOPATH=/projects/myproject
> go get github.com/user/project
After "go get" command, the source of "github.com/user/project" will be downloaded to /projects/myproject/src/github.com/user/project.
When you use "go build" or "go install" then, it will compile as the external packages is in the $GOPATH/src folder.
If you install Go in the default folder, you need to include Go installed bin folder in the PATH environment variable. After that GOPATH is the other environment variable you need for "go" tool to work.
That's how I done it:
1. Setup your workspace first
mkdir $HOME/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
2. Create the project
mkdir -p $GOPATH/src/github.com/user
mkdir $GOPATH/src/github.com/user/hello
touch $GOPATH/src/github.com/user/hello/hello.go
3. Install it
go install github.com/user/hello
4. Run it
cd $GOPATH/bin
./hello
I used the following vagrant image: https://github.com/dcoxall/vagrant-golang
From the help output for go get, it says:
By default, get uses the network to check out missing packages but does not use it to look for updates to existing packages.
When you created the $GOPATH/src/github.com/user/project directory prior to running go get, it assumed that the package had already been downloaded so skipped to the step of trying to build and install the package. That failed because the directory contained no Go source files.
So the simple fix is to not create the folder associated with the package you are trying to download: go get will do that for you.
I'm having some trouble using the pp command to create standalone executables on a Linux machine. It seems that every tutorial says a different thing and I'm a bit confused. I'd like your help regarding two issues:
1. I'm trying to include a module created by me (.pm file), but not sure how to do so and keep getting error messages. Should I use the -M option? or should it be -B? And once the module is included, how do I call it from the script? the usual way (i.e. "use module" and then "module::sub")?
2. I want to include some text files too. So far, I've tried -a and -l options, but not sure if they actually work. Which one should I use? Also, how do I open these files? For instance, if I pack the file tmp.txt, what should the open command look like?
Thank you very much!
Adding modules with the -M option and use the module as usual.
Adding your text file with the -a option, from pp's manual:
By default, files are placed under / inside the package with their original names.
so you should be able to read these text files with:
my $content = PAR::read_file('your_file.txt');