From e85cb975544d224d7f5a53ed89ac932099d27aff Mon Sep 17 00:00:00 2001 From: RinRi-D Date: Mon, 27 Jul 2020 16:03:42 +0000 Subject: [PATCH] initial commit --- setup.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 setup.sh diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..b0c4921 --- /dev/null +++ b/setup.sh @@ -0,0 +1,18 @@ +# create.sh +echo $'cp template.cpp $1.cpp\nnvim -s .gg $1.cpp' > create.sh + +# template +read -n 1 -r -s -p $'Press any key to create template file...\n' +nvim template.cpp + +# start line +read -p $'Enter starting line of cursor:\n' line +((line=line-1)) +echo "$line"gg > .gg + +# run.sh +echo $'g++ -g $1\n./a.out' > run.sh + +# make all executable +chmod +x create.sh +chmod +x run.sh