Skip to content

Commit 8769b0b

Browse files
authored
Arrangements for version 1.3.0
1 parent 5d92272 commit 8769b0b

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

TermiC.sh

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,27 @@ lang="c"
1515
extension="c"
1616
compiler="gcc"
1717
addInclude=""
18+
versiontxt="1.3.0V"
19+
helptxt="TermiC $versiontxt \nLicensed under GPLv3\
20+
\n--help -h: \t Shows this help menu
21+
\n--version -v: \t Shows the version number
22+
\n\nC Mode: \ttermic\
23+
\nCPP Mode: \ttermic cpp\
24+
\n\t\ttermic++
25+
\nTCC Mode: \ttermic tcc\
26+
\n\nCommands:\
27+
\nhelp: \t\tShows this help menu\nabort: \t\tAborts inline prompt mode which are entered by curly bracket\
28+
\nshow: \t\tPrints last successfully compiled source file\nshowtmp: \tPrints last compiled source file with deleted edits\
29+
\nsave: \t\tSaves source file to working directory\nsavebin: \tSaves binary file to working directory\
30+
\nclear: \t\tDeletes all declared functions, classes etc. and resets shell\
31+
\nexit: \t\tDeletes created temp files and exits program\
32+
\n\nAuthors:\nYusuf Kagan Hanoglu\nMax Schillinger"
33+
[[ $1 == "-h" || $1 == "--help" ]] && echo -e $helptxt && exit
34+
[[ $1 == "-v" || $1 == "--version" ]] && echo $versiontxt && exit
1835
[[ $1 == "tcc" ]] && compiler="tcc"
1936
[[ $1 == "cpp" ]] || [[ $0 =~ \+\+ ]] && lang="c++" && compiler="g++ -fpermissive" && extension="cpp" && addInclude="#include <iostream>\nusing namespace std;\n"
2037
command -v bat > /dev/null 2>&1 && catcmd="bat -p -l $lang" || catcmd=cat
21-
echo TermiC 1.3.0V
38+
echo TermiC $versiontxt
2239
echo Language: $lang
2340
echo Compiler: $compiler
2441
echo Type \'help\' for additional information
@@ -51,14 +68,7 @@ while true;do
5168
[[ $prompt == "showtmp" ]] && { [[ -f $sourceFile.tmp ]] && $catcmd $sourceFile.tmp || echo "No .tmp file!"; continue; }
5269
[[ $prompt == "save" ]] && cp $sourceFile $oldPWD && echo "}" >> $oldPWD/$sourceFile && echo "Source file saved to $oldPWD/$sourceFile" && continue
5370
[[ $prompt == "savebin" ]] && cp $binaryFile $oldPWD && echo "Binary file saved to $oldPWD/$binaryFile" && continue
54-
[[ $prompt == "help" ]] && echo -e "Designed by Yusuf Kağan Hanoğlu\nLicensed by GPLv3\
55-
\nC Mode: ./TermiC.sh\
56-
\nCPP Mode: ./TermiC.sh cpp\
57-
\n\nCommands:\nhelp: Shows this help menu\nabort: Aborts inline prompt mode which are entered by curly bracket\
58-
\nshow: Prints last successfully compiled source file\nshowtmp: Prints last compiled source file with deleted edits\
59-
\nsave: Saves source file to working directory\nsavebin: Saves binary file to working directory\
60-
\nclear: Deletes all declared functions, classes etc. and resets shell\
61-
\nexit: Deletes created temp files and exits program" && continue
71+
[[ $prompt == "help" ]] && echo -e "$helptxt" && continue
6272
fullPrompt=`echo "$fullPrompt"; echo "$prompt"`
6373
fullPrompt=`echo "$fullPrompt" | sed '/^[[:blank:]]*$/d'`
6474
inlineOpen=`echo $fullPrompt | grep -o '{\|#ifdef' | wc -l`

0 commit comments

Comments
 (0)