From eb445015dbbf40faf95196b446e60f73504410a1 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Tue, 9 Mar 2021 09:15:45 -0500 Subject: [PATCH] Add autobuild and gitignore for C programs --- .gitignore | 2 ++ autobuild | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 .gitignore create mode 100755 autobuild diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0993049 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*cache* +bin diff --git a/autobuild b/autobuild new file mode 100755 index 0000000..1d4de35 --- /dev/null +++ b/autobuild @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +dir=${1:-\.} +[ -d $dir/bin ] || mkdir $dir/bin +find $dir -name '*.c' -not -iwholename '*cache*' | while read i; do + tcc -o bin/$(basename "$i" .c) "$i" +done -- 2.39.2