From 41fceddb580a2ff32910427cecfa7100ed0e36d6 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Mon, 21 Mar 2022 17:18:49 +0100 Subject: [PATCH] Add make.sh --- make.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 make.sh diff --git a/make.sh b/make.sh new file mode 100755 index 0000000..9a6eec4 --- /dev/null +++ b/make.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ $1 == "preview" ]]; then + [[ $2 ]] || set -- "$1" "build" + if [[ $2 == "build" ]]; then + mkdir -p out + gcc src/preview_mnist.c -o out/preview_mnist + exit + elif [[ $2 == "train" ]]; then + [[ -f out/preview_mnist ]] || $0 preview build + out/preview_mnist data/train-images-idx3-ubyte data/train-labels-idx1-ubyte + exit + elif [[ $2 == "t10k" ]]; then + [[ -f out/preview_mnist ]] || $0 preview build + out/preview_mnist data/t10k-images-idx3-ubyte data/t10k-labels-idx1-ubyte + exit + fi +fi