summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/thomas14
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/thomas b/bin/thomas
index 3d049eb..b05ead5 100755
--- a/bin/thomas
+++ b/bin/thomas
@@ -1,5 +1,8 @@
#!/bin/bash
+FILE=$1
+OUTPUT_FOLDER=output
+
install_mo() {
local confirm
if ! command -v "bin/mo" 2>&1 > /dev/null; then
@@ -16,13 +19,12 @@ install_mo() {
fi
}
-FILE=$1
-OUTPUT_FOLDER=output
-
-mkdir -p $OUTPUT_FOLDER
+build(){
+ mkdir -p $OUTPUT_FOLDER
+ source thomas.env && cat templates/$1 | bin/mo > $OUTPUT_FOLDER/$FILE
+}
install_mo
-
-source thomas.env && cat templates/$1 | bin/mo > $OUTPUT_FOLDER/$FILE
+build
echo $OUTPUT_FOLDER/$FILE