aboutsummaryrefslogtreecommitdiff
path: root/install.nu
diff options
context:
space:
mode:
Diffstat (limited to 'install.nu')
-rwxr-xr-xinstall.nu24
1 files changed, 24 insertions, 0 deletions
diff --git a/install.nu b/install.nu
new file mode 100755
index 0000000..5e69253
--- /dev/null
+++ b/install.nu
@@ -0,0 +1,24 @@
+#!/usr/bin/env nu
+
+#
+# ~~~ portage installer
+#
+
+#
+# ~~~ variables
+
+# get device
+let DEVICE_ID = match (uname | get nodename) {
+ "glados" => "010",
+ "wheatley" => "020",
+ "companioncube" => "110",
+ "cavejohnson" => "120",
+ _ => { error make -u { msg: "invalid device" } }
+}
+
+# get locations
+let PORTAGE_DIR = match ($DEVICE_ID) {
+ "010" | "020" => $"($env.HOME)/src/portage/src",
+ "110" | "120" => $"($env.HOME)/portage/src",
+ _ => { error make -u { msg: "unsupported device" } }
+}