summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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