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