Skip to content

Instantly share code, notes, and snippets.

@alydevs
Last active August 1, 2021 17:48
Show Gist options
  • Select an option

  • Save alydevs/d3d3b598772ddb7a3e21bba1e6524c3c to your computer and use it in GitHub Desktop.

Select an option

Save alydevs/d3d3b598772ddb7a3e21bba1e6524c3c to your computer and use it in GitHub Desktop.
flask app for easier windows setup scoop.alyssasmith.id.au
#!/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