From 5ed6294f677575ada134a60adfef60bd9a3a453c Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Jun 2021 08:35:47 -0400 Subject: [PATCH] link sh to dash --- dotfiles-old/scripts/dash_sh.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dotfiles-old/scripts/dash_sh.sh diff --git a/dotfiles-old/scripts/dash_sh.sh b/dotfiles-old/scripts/dash_sh.sh new file mode 100644 index 0000000..00b9d32 --- /dev/null +++ b/dotfiles-old/scripts/dash_sh.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -ex + +which sh >/dev/null 2>&1 \ + || exit 1 + +SH_LOCATION="$(which sh)" + +[ -L "$SH_LOCATION" ] \ + || exit 1 + +which dash >/dev/null 2>&1 \ + || exit 1 + +unlink "$SH_LOCATION" + +ln -s "$(which dash)" "$SH_LOCATION"