Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 17, 2012, 03:43 PM   #1
StevenHu
macrumors member
 
Join Date: Sep 2009
Location: Southern CA
Why does a Bash command return "is a directory"?

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?
StevenHu is offline   0 Reply With Quote
Old Dec 17, 2012, 04:15 PM   #2
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
From the link you provided.

Quote:
4. Setup New Project

In a terminal window, navigate to the bin directory within the android subfolder of the Cordova distribution.
Type in ./create <project_folder_path> <package_name> <project_name> then press "Enter"
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.
__________________
Space Corps Directive 34124
kryten2 is offline   1 Reply With Quote
Old Dec 17, 2012, 04:16 PM   #3
StevenHu
Thread Starter
macrumors member
 
Join Date: Sep 2009
Location: Southern CA
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.

Last edited by StevenHu; Dec 17, 2012 at 04:39 PM.
StevenHu is offline   0 Reply With Quote
Old Dec 17, 2012, 05:11 PM   #4
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
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
__________________
Space Corps Directive 34124
kryten2 is offline   0 Reply With Quote
Old Dec 17, 2012, 05:14 PM   #5
StevenHu
Thread Starter
macrumors member
 
Join Date: Sep 2009
Location: Southern CA
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
StevenHu is offline   0 Reply With Quote
Old Dec 17, 2012, 06:03 PM   #6
StevenHu
Thread Starter
macrumors member
 
Join Date: Sep 2009
Location: Southern CA
This has been resolved. I had made a mistake in another file that impacted this one.
StevenHu is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
bash, phonegap

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
copy a directory using bash - how to do it? error: is a directory (not copied). cupboy1 OS X 10.8 Mountain Lion 0 Mar 23, 2014 09:50 PM
Using bash to call "Say" command thiagosnow Mac OS X Server, Xserve, and Networking 0 Sep 29, 2013 12:33 PM
"Applications" menu command - "item cannot be found" - owner/permissions? (10.6.8) MacOSExustio OS X 2 Jul 20, 2013 05:05 AM
Trying to extract .cab files. "-bash: unshield: command not found" matto200 OS X 0 Mar 17, 2013 03:04 PM
Did I break bash? Getting "sudo" command not found... mar2194 OS X 6 Jan 10, 2013 07:56 PM

Forum Jump

All times are GMT -5. The time now is 11:12 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC