From 65d47523e1a068e8209d272d57939f04e8ee04ad Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 13 Apr 2021 20:00:16 -0400 Subject: [PATCH] links cc to tcc --- dotfiles-old/scripts/cc.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dotfiles-old/scripts/cc.sh diff --git a/dotfiles-old/scripts/cc.sh b/dotfiles-old/scripts/cc.sh new file mode 100644 index 0000000..876d255 --- /dev/null +++ b/dotfiles-old/scripts/cc.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +CC="$(which cc)" + +which tcc >/dev/null + +if [ -h "$CC" ]; then + unlink "$CC" + ln -s "$(which tcc)" "$CC" +else + printf "$0: \$(which cc), $(which cc), is not a symbolic link\n" >/dev/stderr + exit 1 +fi