Last active
August 1, 2021 17:48
-
-
Save alydevs/d3d3b598772ddb7a3e21bba1e6524c3c to your computer and use it in GitHub Desktop.
flask app for easier windows setup scoop.alyssasmith.id.au
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from flask import * | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def index(): | |
| buckets = "\n".join(f"scoop bucket add {bucket}" for bucket in request.args.get("buckets","").split(",")) if "buckets" in request.args else "" | |
| packages = "\n".join(f"scoop install {package}" for package in request.args.get("pkgs","").split(",")) if "pkgs" in request.args else "" | |
| return f"""Set-ExecutionPolicy RemoteSigned -scope CurrentUser | |
| iwr -useb get.scoop.sh | iex | |
| scoop install git | |
| scoop update | |
| {buckets} | |
| {packages} | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment