Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created July 1, 2017 20:59
Show Gist options
  • Select an option

  • Save infinisil/6eba3dc4431addbd651710cceae4eea2 to your computer and use it in GitHub Desktop.

Select an option

Save infinisil/6eba3dc4431addbd651710cceae4eea2 to your computer and use it in GitHub Desktop.
#! /usr/bin/env nix-shell
#! nix-shell -Q -i bash -p teensy-loader-cli pass
password=$(pass MacBookAir | head -n 1)
result=$(nix-build --argstr PW1 "$password")
sudo teensy-loader-cli -mmcu=atmega32u4 -v -w "$result"/hex/*
src=$(nix-store -q --binding src "$result")
nix-store -q --roots "$src" | xargs rm
nix-store -q --referrers-closure "$src" | xargs nix-store --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment