aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.nu13
-rw-r--r--src/bash/bash_profile8
-rw-r--r--src/bash/linux_bashrc11
-rw-r--r--src/bash/mac_bashrc11
4 files changed, 43 insertions, 0 deletions
diff --git a/install.nu b/install.nu
index aa14268..01c1b38 100755
--- a/install.nu
+++ b/install.nu
@@ -37,6 +37,19 @@ let DOTFILES_DIR = match ($DEVICE_ID) {
#
# ~~~ dotfiles
+# bash
+cp $"($DOTFILES_DIR)/bash/bash_profile" $"($env.HOME)/.bash_profile"
+
+if ($DEVICE_ID == "040") {
+
+ cp $"($DOTFILES_DIR)/bash/mac_bashrc" $"($env.HOME)/.bashrc"
+
+} else {
+
+ cp $"($DOTFILES_DIR)/bash/linux_bashrc" $"($env.HOME)/.bashrc"
+
+}
+
# gammastep
if ($DEVICE_ID == "010" or $DEVICE_ID == "020") {
diff --git a/src/bash/bash_profile b/src/bash/bash_profile
new file mode 100644
index 0000000..6974261
--- /dev/null
+++ b/src/bash/bash_profile
@@ -0,0 +1,8 @@
+#
+# ~~~ bash profile
+#
+
+# load bashrc
+if [[ -f ~/.bashrc ]]; then
+ . ~/.bashrc
+fi
diff --git a/src/bash/linux_bashrc b/src/bash/linux_bashrc
new file mode 100644
index 0000000..9003c5d
--- /dev/null
+++ b/src/bash/linux_bashrc
@@ -0,0 +1,11 @@
+#
+# ~~~ bash config
+#
+
+# exit early if not interactive
+if [[ $- != *i* ]]; then
+ return
+fi
+
+# switch to nushell
+[ -x /usr/bin/nu ] && SHELL=/usr/bin/nu exec /usr/bin/nu
diff --git a/src/bash/mac_bashrc b/src/bash/mac_bashrc
new file mode 100644
index 0000000..542b904
--- /dev/null
+++ b/src/bash/mac_bashrc
@@ -0,0 +1,11 @@
+#
+# ~~~ bash config
+#
+
+# exit early if not interactive
+if [[ $- != *i* ]]; then
+ return
+fi
+
+# switch to nushell
+[ -x /opt/homebrew/bin/nu ] && SHELL=/opt/homebrew/bin/nu exec /opt/homebrew/bin/nu