Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Small refinement: src was not deleted properly
Browse files Browse the repository at this point in the history
  • Loading branch information
grtjn committed Feb 20, 2015
1 parent 9381e14 commit bdf8a90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions ml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,11 @@ then

pushd ${app_name} > /dev/null || exit 1
rm -rf .git* || exit 1
if [ "$APPTYPE" = "rest" ]
if [ "$APPTYPE" != "mvc" ] && [ "$APPTYPE" != "hybrid" ]
then
# For a REST application, we won't be using the MVC code. Remove it.
# mvc and hybrid apps will use it.
# For non-MVC applications, we won't be using the MVC code. Remove it.
rm -rf src/* || exit 1
printf "\nNo initial source code is provided for REST apps. You can copy code from Application Builder under the source directory.\n"
printf "\nNo initial source code is provided for non-MVC apps. You can capture code from a REST application, or add your own code.\n"
fi

./ml init ${app_name} ${@} || exit 1
Expand Down
7 changes: 3 additions & 4 deletions ml.bat
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,12 @@ pushd %app_name%
rmdir /Q /S .git
del /F /Q .gitignore

if "%APPTYPE%"=="rest" (
REM For a REST application, we won't be using the MVC code. Remove it.
REM mvc and hybrid apps will use it.
if not "%APPTYPE%"=="mvc" if not "%APPTYPE%"=="hybrid" (
REM For non-MVC applications, we won't be using the MVC code. Remove it.
rmdir /S /Q src
mkdir src
echo.
echo No initial source code is provided for REST apps. You can copy code from Application Builder under the source directory.
echo No initial source code is provided for non-MVC apps. You can capture code from a REST application, or add your own code.
)

for /f "tokens=1-2*" %%a in ("%*") do (
Expand Down

0 comments on commit bdf8a90

Please sign in to comment.