Last active
September 29, 2015 16:57
-
-
Save colstrom/cc1029884a750740c97a to your computer and use it in GitHub Desktop.
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 bash | |
| ARCHIVE=nix_1.10-1_amd64.deb | |
| CHECKSUM=b284d26ca9ee57f90ce9a3eca1a8eae19243927491e374ac3a1322af7db07378 | |
| function resolve-dependencies { | |
| apt-get --assume-yes install \ | |
| libdbd-sqlite3-perl \ | |
| libwww-curl-perl xz-utils \ | |
| software-properties-common | |
| } | |
| function download { | |
| curl --output "${ARCHIVE}" "https://hydra.nixos.org/build/25489757/download/1/${ARCHIVE}" | |
| } | |
| function verify { | |
| echo "${CHECKSUM} ${ARCHIVE}" > "/tmp/${ARCHIVE}.checksum" | |
| shasum --check "${ARCHIVE}.checksum" | |
| } | |
| function install { | |
| sudo dpkg --install "${ARCHIVE}" | |
| } | |
| function install-nix { | |
| resolve-dependencies && download && verify && install | |
| } | |
| install-nix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment