what cygwin packages do I need to install to be able to run commands from cmd.exe on windows?

07
2014-07
  • LIUFA

    I am trying to install JSCover, I snooped around and figured that to run .sh files on windows, the easiest option is to install cygwin. Which cygwin packages do I need to install to be able to run commands from cmd.exe on windows? If it is unclear what packages I am talking about please check screenshot below.

    enter image description here

    UPDATE: I have tried default packages by clicking next in widow above. When I try to run sh example-server.sh in cmd in admin mode I get following error. enter image description here

    Or Cygwin installation only works within it's boundaries. e.g only things in Cygwin console window?

  • Answers
  • E Carter Young

    Running sh is only native inside Cygwin. Click the Cygwin Shortcut on your Desktop then download the file natively using a tool like wget in Cygwin, then run the script, otherwise run the jar file natively in Windows

    Cygwin Terminal

    As you can see, my programmer's Teststand in my Office has Cygwin installed because I miss my Gentoo Desktop at home. The only thing that isn't native here is the DRush Command Prompt, so that I can fool w/ my website on my lunch break. It contained the wget.exe that was added to my $PATH after installing the Windows Compliant DRush, but the same idea applies if you used the Cygwin installer to fetch the wget package. The $ indicates a bash prompt that will run scripts natively inside the window only. See Chapter 3 of the Cygwin User's Guide to understand how to get the output you may need out to Windows.

    Use the wget you install to download the package in your post and it should download to your home directory. Use pwd to find out what that directory is and the information from Chapter 3 to gather the output you need. UNLESS YOU'VE BEEN USING CYGWIN AWHILE, DO NOT leave the cygwin terminal open while messing with the Windows Physical Location, and vice versa


  • Related Question

    Installing Cygwin packages from the command-line
  • knorv

    Possible Duplicate:
    upgrading and installing packages through the cygwin command line?

    I'm looking for a "yum"-link method to install additional Cygwin packages from the command-line. Let's say I want to add the package "Math/bc", then ideally I'd like to be able to do it using one command as in:

    yum install bc
    

    Currently the only way I've found to install new packages is to locate and run the installation file SETUP.EXE file and then scroll to the relevant package, add it, etc. This is quite cumbersome so I'm sure there is a smarter command-line way to add an additional package.


  • Related Answers
  • knorv

    The answer is:

    wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
    chmod +x apt-cyg
    mv apt-cyg /usr/local/bin/
    apt-cyg install bc