dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 7fcf7b38a6338e5ddddcfcd9c8241b0394d7a609
parent 428d821940e54c6fa00d8020b30d1272945b397c
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat, 14 Mar 2020 22:15:33 +0100

Add support for C source

Diffstat:
M.local/bin/compile | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.local/bin/compile b/.local/bin/compile @@ -19,7 +19,7 @@ show_help() { show_version() { echo "${0##*/} version $version" - echo "Licensed under the GNU Public License, v3+" + echo "Licensed under the ISC License" echo "written by Anders Damsgaard, anders@adamsgaard.dk" echo "https://src.adamsgaard.dk/dotfiles" } @@ -54,6 +54,8 @@ handle_target() { fi;; *\.gp) run_compile "gnuplot '$1'" "$1";; + *\.c) + run_compile "cc -std=c99 -pedantic -Wall -O2 -g '$1'" "$1";; *\.[0-9]) run_compile "refer -PS -e '$1' | groff -mandoc -T pdf > '$(basename "${base}").pdf'" "$1";; *)