Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script Wrote for adding chromium #149

Merged
merged 3 commits into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def index():
email = request.form['email']
TRAVIS_TAG = request.form['TRAVIS_TAG']
event_url = request.form['event_url']
GENERATOR_ = request.form['GENERATOR_']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool.
To get all variables, you should be able to do something like

variables = {}
for name, value in request.form.items():
    if name.startswith("GENERATOR_"):
        variables[name] = value

file = request.files['file']
if file and allowed_file(file.filename):
filename = secure_filename(file.filename)
Expand Down
3 changes: 3 additions & 0 deletions scripts/chromium-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
if echo "$GENERATOR_package_chromium" | grep -q chromium; then
sudo apt-get install -q -y chromium; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep 👍

2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
<tbody>
<tr>
<td>Chromium</td>
<td><input type="checkbox"></td>
<td><input name="GENERATOR_package_chromium" type="checkbox" value="chromium" id="chromium"></td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am excited to see this in action one day.

</tr>
<tr>
<td>Firefox</td>
Expand Down