fix: separate Bash import streams

This commit is contained in:
2026-08-12 17:42:25 +09:00
parent 1f9af6ee3e
commit 9566995c07
2 changed files with 26 additions and 2 deletions

View File

@@ -1,8 +1,22 @@
#!/usr/bin/env bash
#!/bin/bash
set -euo pipefail
iconv -f EUC-JP -t UTF-8 "$@" | awk '
transcode()
{
local file
if (( $# == 0 )); then
iconv -f EUC-JP -t UTF-8
return
fi
for file in "$@"; do
iconv -f EUC-JP -t UTF-8 "$file"
printf '\n'
done
}
transcode "$@" | awk '
function fail(s) {
print "skk2ktrans: " FILENAME ":" FNR ": " s >"/dev/stderr"
bad = 1