From f80d8d54824dda058e4bc5ee28ddfc47a3a1ac04 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Thu, 19 Dec 2019 22:04:16 -0800 Subject: [PATCH] Update cgen to exit right on failure and add alias to bash --- dotfiles/bash/bashrc | 5 +++++ dotfiles/bash/scripts/cgen.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dotfiles/bash/bashrc b/dotfiles/bash/bashrc index e60b812..870128f 100644 --- a/dotfiles/bash/bashrc +++ b/dotfiles/bash/bashrc @@ -1,6 +1,11 @@ # Use the iterm2 material theme in the root directory of the essentials repository. For linux, # you will need to source a material theme color scheme for your terminal. +symlink_dir=$( cd "$( dirname "`readlink -f ${BASH_SOURCE[0]}`" )" && pwd ) + +# Useful global functions +alias cgen=$symlink_dir/scripts/cgen.sh + if [ -f ~/.inputrc ]; then bind -f ~/.inputrc else diff --git a/dotfiles/bash/scripts/cgen.sh b/dotfiles/bash/scripts/cgen.sh index ef4569b..6f40b8b 100755 --- a/dotfiles/bash/scripts/cgen.sh +++ b/dotfiles/bash/scripts/cgen.sh @@ -9,7 +9,7 @@ then echo "Name must be specified" echo "" echo "./cgen.sh [cmake version] [C Standard]" - return -1 + exit -1 fi if [ -z $cmake_version ]