diff --git a/app/barrabrasil.py b/app/barrabrasil.py
index f1f0d1f..28846d7 100644
--- a/app/barrabrasil.py
+++ b/app/barrabrasil.py
@@ -1,5 +1,6 @@
from flask import Flask, url_for, render_template, request, Response, make_response
import hashlib,webbrowser
+from sys import argv
app = Flask(__name__)
@app.route('/')
@@ -14,7 +15,7 @@ def pagina_teste():
return make_response("
403 Forbidden
", 403)
@app.route('/barra.js')
-def barra(profile='copa2014'):
+def barra():
with app.open_resource('templates/%s/barra-brasil.js' % profile) as f:
conteudo = f.read().decode('utf-8')
etag = hashlib.sha1(conteudo.encode('utf-8')).hexdigest()
@@ -36,3 +37,4 @@ if __name__ == '__main__':
profile = 'default'
webbrowser.open("http://127.0.0.1:5000/",new=2)
app.run(debug=False)
+
diff --git a/build.sh b/build.sh
index 6511530..68edfe5 100755
--- a/build.sh
+++ b/build.sh
@@ -1,10 +1,17 @@
#!/bin/sh
echo ""
-if [ -n "$1" ] && test -d "recipes/$1"
+if [ -n "$1" ]
then
- cd recipes/$1
+ profile=$1
+else
+ profile='default'
+fi
+
+if test -d "recipes/$1"
+then
+ cd recipes/$profile
sh ./compile.sh
- python ../../app/barrabrasil.py $1
+ python ../../app/barrabrasil.py $profile
else
echo "Error. Profile $1 does not exist."
fi
--
libgit2 0.21.2