diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-03-30 11:23:59 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-03-30 11:23:59 +0530 |
commit | 0fca442eeead2bdd99df7f84412db077d8e2c875 (patch) | |
tree | 5b55757bcd85dac413838e3d9d9a5e135c327a30 | |
parent | fa3750251398d43a768e498ddf96663bff3d993a (diff) |
adding c/c++ compile alias-like script
-rw-r--r-- | .config/nvim/init.vim | 2 | ||||
-rwxr-xr-x | .scripts/compile | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 2df5e24..1558b64 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,6 +1,6 @@ set number set relativenumber -set tabstop=4 +set tabstop=4 set softtabstop=4 set shiftwidth=4 set expandtab diff --git a/.scripts/compile b/.scripts/compile new file mode 100755 index 0000000..b64016f --- /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" +gcc -o $output $file -lstdc++ |