summaryrefslogtreecommitdiff
path: root/root_scripts
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-05-08 18:44:03 -0500
committerCraig Jennings <c@cjennings.net>2025-05-08 18:44:03 -0500
commit0d3c6fa03f957ec03dc4c292d3f09c65d73c2bab (patch)
tree550db3736893a142dbf1ad7b4063ca59ac33cab8 /root_scripts
parentf6c68a5a56bb03fa61d80869aa490bc84c06506b (diff)
making zshell the user's shell
Diffstat (limited to 'root_scripts')
-rwxr-xr-xroot_scripts/change_shell.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/root_scripts/change_shell.sh b/root_scripts/change_shell.sh
index 2f7e55d..11a1d16 100755
--- a/root_scripts/change_shell.sh
+++ b/root_scripts/change_shell.sh
@@ -2,6 +2,16 @@
# Craig Jennings <c@cjennings.net>
# changes shell for cjennings and installs mc
-chsh -s /usr/local/bin/bash cjennings
+# ensure root
+if ! [ $(id -u) -eq 0 ]
+then
+ echo "Must run as root. Exiting."
+ exit
+fi
-pkg install -y mc
+# install zshell and change shell to it
+pkg install -y zsh
+chsh -s /usr/local/bin/zsh cjennings
+
+# misc
+pkg install -y mc # depends on either bash or zsh