diff options
Diffstat (limited to 'src/web/lang/_bin/transpile.sh')
-rwxr-xr-x | src/web/lang/_bin/transpile.sh | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/web/lang/_bin/transpile.sh b/src/web/lang/_bin/transpile.sh deleted file mode 100755 index 36cd226..0000000 --- a/src/web/lang/_bin/transpile.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -lang_part() { - echo "$1" | awk "{split(\$0,a,\" = \"); print a[$2]}" -} -export -f lang_part - -handle_line() { - line="$1" - left=$(lang_part "$line" 1) - right=$(lang_part "$line" 2) - echo "$left" | grep -Ev '_content|_line' > /dev/null - code=$? - if [ $code -eq 0 ]; then - right=$(echo "$right" | uwuify) - fi; - right=${right%;}; - echo "$left = $right;" -} -export -f handle_line - -transpile() { - file="$1" - out="$2" - printf "" > "$out" - printf "<?php /* Copyright (c) 2024 Freya Murphy */\n\n" > "$out"; - grep "\$lang" < "$file" | xargs -n1 -I{} bash -c 'handle_line "$@"' _ {} >> "$out" -} - -transpile "$1" "$2" |