diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2025-11-25 15:04:40 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2025-11-25 15:04:40 -0500 |
| commit | c87f73273e3e8d6b4781207cc5f671f931f38bf6 (patch) | |
| tree | 07a05f2241eb6b468b4796de0e1a5e736d0142ed /compile | |
| parent | c32b46b00ddfd41e58f0d4a3fb0ca96a0f09acb2 (diff) | |
| parent | 6faf64c17a9fe1c5f5ab0f313c1d36c867097ad7 (diff) | |
| download | dotfiles-c87f73273e3e8d6b4781207cc5f671f931f38bf6.tar.gz dotfiles-c87f73273e3e8d6b4781207cc5f671f931f38bf6.tar.xz | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'compile')
| -rwxr-xr-x | compile/oksh.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/compile/oksh.sh b/compile/oksh.sh new file mode 100755 index 0000000..1a44c0f --- /dev/null +++ b/compile/oksh.sh @@ -0,0 +1,31 @@ +#!/bin/sh +set -ex +codedir="$HOME/scm/pub" +okshdir="${codedir}/ibara-oksh" +if ! [ -d "$okshdir" ] ; then + git clone https://github.com/ibara/oksh "$okshdir" +fi +cd "$okshdir" +git checkout oksh-7.6 +./configure +make +sudo make install +cd - + +if ! grep /usr/local/bin/oksh /etc/shells ; then + sudo sh -c 'echo /usr/local/bin/oksh >> /etc/shells' +fi + +if ! grep -qF 'export ENV=$HOME/.kshrc' ~/.profile; then + echo 'export ENV=$HOME/.kshrc' >> ~/.profile +fi + +set +x +if ! grep ^$(id -un) /etc/passwd | grep /usr/local/bin/oksh ; then + printf "Change shell to oksh? [y]es/[n]o: " + read -r resp + if [ "$resp" = "y" ] ; then + chsh -s /usr/local/bin/oksh + fi +fi +set -x |
