Browse Source

Updated to comply with new features from RinRi

master
Madiwka3 4 years ago
parent
commit
d3c815a883
2 changed files with 14 additions and 5 deletions
  1. +3
    -3
      README.md
  2. +11
    -2
      setup.sh

+ 3
- 3
README.md View File

@@ -37,10 +37,10 @@ In order to create a new .cpp file, you have to run create.sh with filename argu
./create.sh 1234a ./create.sh 1234a
``` ```


You will be automatically redirected to VSCode.
You will be automatically redirected to the editor of your choise.


To compile&run file, you can just use run.sh with filename, (also without extension)
To compile&run file, you can just use exe.sh with filename, (also without extension)


```shell ```shell
./run.sh 1234a
./exe.sh 1234a
``` ```

+ 11
- 2
setup.sh View File

@@ -19,7 +19,7 @@ echo "Your distro? ( 1)Arch, 2)Debian): "
read distro read distro
if [ $distro -eq 1 ] if [ $distro -eq 1 ]
then then
sudo pacman -Syu g++ $editorPACKAGE
sudo pacman -Syu gcc gdb $editorPACKAGE
elif [ $distro -eq 2 ] elif [ $distro -eq 2 ]
then then
sudo apt update sudo apt update
@@ -54,9 +54,18 @@ printf '$1.cpp ' >> $DIR/create.sh
read -p "Press enter to create template" A read -p "Press enter to create template" A
$editor $DIR/template.cpp $editor $DIR/template.cpp


# color.sh
echo $'echo -en "\033[31m" ## red\neval $* | while read line; do\necho -en "\033[36m" ## blue\necho $line\necho -en "\033[31m" ## red\ndone\necho -en "\033[0m" ## reset color' > $DIR/color.sh

# run.sh # run.sh
echo $'g++ -o $1.out -g $1.cpp\n./$1.out' > $DIR/run.sh
echo $'g++ -std=c++14 -o $1.out -g $1.cpp\n./color.sh ./$1.out\n printf "\\n End of output..."' > $DIR/run.sh

# exe.sh
echo $'./color.sh ./run.sh $1' > $DIR/exe.sh


# make all executable # make all executable
chmod +x $DIR/create.sh chmod +x $DIR/create.sh
chmod +x $DIR/run.sh chmod +x $DIR/run.sh
chmod +x $DIR/exe.sh
chmod +x $DIR/color.sh


Loading…
Cancel
Save