summaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2024-08-31 23:33:25 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2024-08-31 23:33:25 +0330
commitbcde4724cdaa8becd27160d8e8733919ed726366 (patch)
treeafbce2f02ec19c6e80d183c794a4a45d607ae499 /project
parent108a4a0c2c14d70c366bbfaa65b7287824fb33da (diff)
some formatting and renaming
Diffstat (limited to 'project')
-rwxr-xr-xproject29
1 files changed, 29 insertions, 0 deletions
diff --git a/project b/project
new file mode 100755
index 0000000..c1daf50
--- /dev/null
+++ b/project
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+project_name="atui"
+
+function compile(){
+ if [ ! -d build ]; then
+ if [ $(mkdir build) ]; then # if error
+ echo "cannot make 'build' dir"
+ exit
+ fi
+ fi
+
+ gcc -Wall -Wextra -O3 src/main.c src/ui/tui.c -o "build/$project_name"
+}
+
+function run(){
+ compile && "./build/$project_name" "$@"
+ echo
+ echo "$?"
+}
+
+function clear(){
+ rm -r ./build/
+}
+
+function_name="$1"
+shift
+
+$function_name "$@"