diff options
| author | Autumn <git@autumnfo.rest> | 2026-04-30 20:48:11 +0100 |
|---|---|---|
| committer | Autumn <git@autumnfo.rest> | 2026-04-30 20:48:11 +0100 |
| commit | 39fe905d801699a3e98cc0976f4d508bc72b5692 (patch) | |
| tree | c222910002e41896e8289ced7a15cb9470c39695 | |
[meta] added install script
| -rwxr-xr-x | install.nu | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/install.nu b/install.nu new file mode 100755 index 0000000..c09310c --- /dev/null +++ b/install.nu @@ -0,0 +1,26 @@ +#!/usr/bin/env nu + +# +# ~~~ dotfiles installer +# + +# +# ~~~ variables + +# get device +let DEVICE_ID = match (uname | get nodename) { + "glados" => "010", + "wheatley" => "020", + "chell" => "030", + "hx7124" => "040", + "companioncube" => "110", + "cavejohnson" => "120", + _ => { error make -u { msg: "invalid device" } } +} + +# get locations +let DOTFILES_DIR = match ($DEVICE_ID) { + "010" | "020" => $"($env.HOME)/src/dotfiles", + "110" | "120" => $"($env.HOME)/dotfiles", + _ => { error make -u { msg: "unsupported device" } } +} |
