Skip to content

Instantly share code, notes, and snippets.

@lastarc
lastarc / cm
Last active October 7, 2021 16:53
Bash script for compiling and running clean files, optionally enabling function testing
#!/usr/bin/env bash
# Developed by Arc (github.com/lastarc)
if [[ -n $1 ]]; then
fileDir="$( cd "$( dirname "$1" )" && pwd )";
fileName="$( basename $1 )";
moduleName="$( echo $fileName | sed -e "s/\.icl//" )";
filePath="$fileDir/$fileName";
echo "$fileDir/$fileName" $moduleName;