Why does a Bash command return "is a directory"?

Discussion in 'Mac Programming' started by StevenHu, Dec 17, 2012.

  1. macrumors member

    Joined:
    Sep 3, 2009
    Location:
    Southern CA
    #1
    When I follow the steps for starting a new Cordova PhoneGap project for Eclipse (following these directions), I drag Android's /bin directory to the Terminal window first (which contains the create script), then type in:

    ./create /Users/Steve/Documents/PhoneGap_apps/PhoneGap_apps/appName2 com.companyname.appName2 appName2

    ... to create the project.

    But what I get in return is:

    -bash: /Users/Steve/Downloads/phonegap-phonegap-8a3aa47/lib/android/bin: is a directory

    The appName2 directory is not created.

    Why do I get that "is a directory" notice, and how do I resolve it to create the directory?
     
  2. macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    From the link you provided.

    You navigate to the bin directory with the cd command, so in Terminal :

    type in cd then a space then drag Android's /bin directory to the Terminal window eg :

    Code:
    cd /Users/Steve/Downloads/phonegap-phonegap-8a3aa47/lib/android/bin
    don't forget to enter after this and then run your command eg :

    Code:
    ./create /Users/Steve/Documents/PhoneGap_apps/PhoneGap_apps/appName2 com.companyname.appName2 appName2
    ... to create the project.
     
  3. StevenHu, Dec 17, 2012
    Last edited: Dec 17, 2012

    thread starter macrumors member

    Joined:
    Sep 3, 2009
    Location:
    Southern CA
    #3
    Wow! That's the answer! Thanks a lot! I thought dragging the folder over was the same thing as changing the directory.

    Uh-oh. It created the directory all right, but the folder is empty. It should be filled with files to create the Android version of a PhoneGap app.
     
  4. macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #4
    Sorry I don't use Eclipse but I assume you've followed all the steps in the documentation? Did you install the Android SDK? Where did you install it? Can you run the following in Terminal and post the output ?

    Code:
    echo $PATH
     
  5. thread starter macrumors member

    Joined:
    Sep 3, 2009
    Location:
    Southern CA
    #5
    I had followed all the steps in the documentation and successfully created an app. But the steps are not working now!

    Here's the result of echo $PATH:

    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/github:/opt/X11/bin:/Applications/android-sdk-mac_x86platform-tools:/Applications/android-sdk-mac_x86/platform-toolstools:/Applications/android-sdk-mac_x86/tools/Users/Steve/Downloads/phonegap-phonegap-8a3aa47/lib/android/bin
     
  6. thread starter macrumors member

    Joined:
    Sep 3, 2009
    Location:
    Southern CA
    #6
    This has been resolved. I had made a mistake in another file that impacted this one.
     

Share This Page