Fix path in fnpdjango.
[fnp-django-template.git] / bootstrap.sh
index 0059599..36d799d 100644 (file)
@@ -8,7 +8,7 @@
 # Make it a function, so that it works with `source`
 start_project() {
 
 # Make it a function, so that it works with `source`
 start_project() {
 
-local DJANGO_REQ='Django>=1.7,<1.8'
+local DJANGO_REQ='Django>=1.8,<1.9'
 local DJANGO_ROOT='src'
 local PYPI='https://py.mdrn.pl:8443/simple'
 local DEFAULT_PYTHON="`which python3.4`"
 local DJANGO_ROOT='src'
 local PYPI='https://py.mdrn.pl:8443/simple'
 local DEFAULT_PYTHON="`which python3.4`"
@@ -89,7 +89,7 @@ echo -e "${strong}Downloading project template...${normal}"
 if [[ "$FNP_PROJECT_TEMPLATE" =~ ^(https?|ftp):// ]]; then
     local PROJECT_TMPDIR=`mktemp -d fnp-django-template-XXX`
     curl "$FNP_PROJECT_TEMPLATE" | tar xzf - -C "$PROJECT_TMPDIR"
 if [[ "$FNP_PROJECT_TEMPLATE" =~ ^(https?|ftp):// ]]; then
     local PROJECT_TMPDIR=`mktemp -d fnp-django-template-XXX`
     curl "$FNP_PROJECT_TEMPLATE" | tar xzf - -C "$PROJECT_TMPDIR"
-    local TEMPLATE="$PROJECT_TMPDIR"/fnp-django-template-*/src
+    local TEMPLATE=("$PROJECT_TMPDIR"/fnp-django-template-*/src)
 else
     local TEMPLATE="$FNP_PROJECT_TEMPLATE"
 fi
 else
     local TEMPLATE="$FNP_PROJECT_TEMPLATE"
 fi
@@ -109,13 +109,14 @@ cd "$PROJECT"
 
 chmod +x "$DJANGO_ROOT"/manage.py
 mv _gitignore .gitignore
 
 chmod +x "$DJANGO_ROOT"/manage.py
 mv _gitignore .gitignore
+cp etc/local_settings.py.sample etc/local_settings.py
+cp etc/local_settings_test.py.sample etc/local_settings_test.py
+ln -s ../../../etc/local_settings.py ../../../etc/local_settings_test.py $DJANGO_ROOT/$PROJECT/settings/
 
 echo -e "${strong}Installing requirements...${normal}"
 
 echo -e "${strong}Installing requirements...${normal}"
-pip install -i "$PYPI" -r requirements.txt
-echo -e "${strong}Installing developer requirements...${normal}"
-pip install -i "$PYPI" -r requirements-dev.txt
-echo -e "${strong}Running syncdb...${normal}"
-"$DJANGO_ROOT"/manage.py syncdb --noinput
+pip install -i "$PYPI" -r requirements/dev.txt
+echo -e "${strong}Running migrate...${normal}"
+"$DJANGO_ROOT"/manage.py migrate #--noinput
 
 echo -e "${strong}Starting new git repository...${normal}"
 git init
 
 echo -e "${strong}Starting new git repository...${normal}"
 git init