diff options
Diffstat (limited to '.scripts/compile_')
-rwxr-xr-x | .scripts/compile_ | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.scripts/compile_ b/.scripts/compile_ new file mode 100755 index 0000000..abd9b9f --- /dev/null +++ b/.scripts/compile_ @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "enter a correct .cpp file" + exit +else + file="$1" +fi +output=$(echo "$1" | cut -d "." -f1) +echo "$file" +echo "$output" +g++ -o $output $file -lstdc++ |