Permalink
Browse files

No commit message

  • Loading branch information...
1 parent 7d96e92 commit bb5d324a2e2c02d95ab860db047a0a373e8689ca @lukemorton committed Apr 12, 2011
Showing with 14 additions and 10 deletions.
  1. +14 −10 newapp.sh
View
@@ -13,18 +13,22 @@
# Default
DEFAULT_APP_PATH="$HOME/koapp"
-echo $DEFAULT_APP_PATH
-
-# Request application name
-echo "Please provide a path in which to install your new Kohana application: "
-read CUSTOM_APP_PATH
-
-# Set app path
-if [ -n "$CUSTOM_APP_PATH" ];
+if [ -n "$1" ];
then
- APP_NAME="$CUSTOM_APP_PATH"
+ # Use first arg as application path
+ APP_NAME="$1"
else
- APP_NAME="$DEFAULT_APP_PATH"
+ # Request application name
+ echo "Please provide a path in which to install your new Kohana application: "
+ read CUSTOM_APP_PATH
+
+ # Set app path
+ if [ -n "$CUSTOM_APP_PATH" ];
+ then
+ APP_NAME="$CUSTOM_APP_PATH"
+ else
+ APP_NAME="$DEFAULT_APP_PATH"
+ fi
fi
# Using app name

0 comments on commit bb5d324

Please sign in to comment.