#!/bin/bash # Fresh-machine entry point for github.com/omertuc/persist (docs/persist.md): # # curl -fsSL https://persist.tuchfeld.dev | bash # # persist is private, so this is the one public piece: GitHub login, clone, # then hand over to persist's own bootstrap.sh. Keep it that small. set -e main() { # Piped into bash, stdin is this script; prompts need the terminal exec /dev/null 2>&1; then gh auth login --web --git-protocol ssh --skip-ssh-key --insecure-storage -s admin:public_key fi if [[ ! -d ~/persist ]]; then gh repo clone omertuc/persist ~/persist fi exec ~/persist/bootstrap.sh } # Only runs once the whole script has arrived, so a dropped download can't run half of it main