New folder structure

This commit is contained in:
2023-04-03 17:47:42 +02:00
commit a2bdf977d9
42 changed files with 2055 additions and 0 deletions

29
Compilers/compilaKotlin.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
bin="bin"
if test $# -eq 1; then
dir=$(pwd)
jar=$(echo $1 | awk -F'.kt' '{print $1}')
if test -d "$dir/$bin"; then
kotlinc "$dir/$1" -include-runtime -d "$dir/$bin/$jar.jar"
else
kotlinc "$dir/$1" -include-runtime -d "$dir/$jar.jar"
fi
elif test $# -ge 2; then
dir=$(pwd)
jar=$(echo $2 | awk -F'.kt' '{print $1}')
if test $1 -eq 1; then
if test -d "$dir/$bin"; then
kotlinc "$dir/$2" -include-runtime -d "$dir/$bin/$jar.jar"
java -jar "$dir/$bin/$jar.jar"
else
kotlinc "$dir/$2" -include-runtime -d "$dir/$jar.jar"
java -jar "$dir/$jar.jar"
fi
fi
else
echo "Use:"
echo -e " $ \u001b[32mck name.kt \u001b[0m"
echo -e " $ \u001b[33mck name.kt 1\u001b[0m"
echo -e "**note: if a bin folder exists, will output .jar there"
exit 1
fi