#!/usr/bin/env bash FILES=( ".envrc" ".gitignore" "Makefile" "report.tex" "shell.nix" ) PREFIX=https://gist.githubusercontent.com/somecollagist/bd0afe4ef5c2706e26507d9f78c514b4 RAW=/raw/ for f in "${FILES[@]}"; do if [ -e $f ]; then echo "Already exists: $f" else echo "Fetching $f" wget -q "$PREFIX""$RAW""$f" fi done touch references.bib which direnv > /dev/null if [ $? -eq 0 ]; then direnv allow else rm .envrc fi if [ `cat /etc/os-release | grep -oP "(?<=^NAME=)NixOS"` != "NixOS" ]; then rm shell.nix fi cat << Output Thank you for using my coursework template! Make sure to: - Update report.tex with your details - Install the necessary packages in shell.nix (if you use it!) - Change the Makefile to do whatever you need - Put your own spin on things! Plagiarism is bad >:( cool sweet jas Output