diff --git a/calt_table_maker.sh b/calt_table_maker.sh index 3d50bd8..fdad718 100755 --- a/calt_table_maker.sh +++ b/calt_table_maker.sh @@ -636,7 +636,7 @@ done echo if [ "${glyphNo_flag}" = "false" ]; then - gsubList_txt=$(find . -name "${gsubList}.txt" -maxdepth 1 | head -n 1) + gsubList_txt=$(find . -maxdepth 1 -name "${gsubList}.txt" | head -n 1) if [ -n "${gsubList_txt}" ]; then # gsubListがあり、 echo "Found GSUB List" caltNo=$(grep -m 1 'Substitution in="A"' "${gsubList}.txt") diff --git a/font_generator.sh b/font_generator.sh index e8859b7..55908bc 100755 --- a/font_generator.sh +++ b/font_generator.sh @@ -26,7 +26,7 @@ font_version="0.1.0" vendor_id="PfEd" version="version" -version_txt=$(find . -name "${version}.txt" -maxdepth 1 | head -n 1) +version_txt=$(find . -maxdepth 1 -name "${version}.txt" | head -n 1) if [ -n "${version_txt}" ]; then font_v=$(head -n 1 < "${version_txt}") if [ -n "${font_v}" ]; then @@ -16920,7 +16920,7 @@ if [ "${patch_only_flag}" = "false" ]; then fi # ファイル名を変更 - find . -not -name "*.*.ttf" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.*.ttf" | \ grep -e "${font_familyname}${font_familyname_suffix}-.*\.ttf$" | while read line do style_ttf=${line#*-}; style=${style_ttf%%.ttf} @@ -16932,7 +16932,7 @@ fi # パッチ適用 if [ "${patch_flag}" = "true" ]; then - find . -name "${font_familyname}-*.nopatch.ttf" -maxdepth 1 | while read line + find . -maxdepth 1 -name "${font_familyname}-*.nopatch.ttf" | while read line do font_ttf=$(basename ${line}) $fontforge_command -script ${tmpdir}/${font_patcher} \ diff --git a/run_ff_ttx.sh b/run_ff_ttx.sh index e4ad9ba..9be2e42 100755 --- a/run_ff_ttx.sh +++ b/run_ff_ttx.sh @@ -40,7 +40,7 @@ symbol_only_flag="false" # カーニング設定を記号、桁区切りのみ font_version="0.1.0" version="version" -version_txt=$(find . -name "${version}.txt" -maxdepth 1 | head -n 1) +version_txt=$(find . -maxdepth 1 -name "${version}.txt" | head -n 1) if [ -n "${version_txt}" ]; then font_v=$(head -n 1 < ${version_txt}) if [ -n "${font_v}" ]; then @@ -338,7 +338,7 @@ if [ "${mode}" = "-F" ]; then mv -f ${font_familyname}${font_familyname_suffix}*.ttf "${build_fonts_dir}/${font_familyname}/${font_familyname_suffix}/." fi # パッチ未適用のフォントを除外して移動 - find . -not -name "*.nopatch.ttf" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.nopatch.ttf" | \ grep -e "${font_familyname}.*\.ttf$" | while read line do mv -f "${line}" "${build_fonts_dir}/${font_familyname}/." diff --git a/table_modificator.sh b/table_modificator.sh index 3015c9b..7155294 100755 --- a/table_modificator.sh +++ b/table_modificator.sh @@ -213,14 +213,14 @@ echo # ttxファイルを削除、パッチのみの場合フォントをリネームして再利用 rm -f ${font_familyname}*.ttx ${font_familyname}*.ttx.bak if [ "${patch_only_flag}" = "true" ]; then - find . -name "${font_familyname}*.orig.ttf" -maxdepth 1 | while read P + find . -maxdepth 1 -name "${font_familyname}*.orig.ttf" | while read P do mv -f "$P" "${P%%.orig.ttf}.ttf" done fi # フォントがあるかチェック -fontName_ttf=$(find . -name "${font_familyname}*.ttf" -maxdepth 1 | head -n 1) +fontName_ttf=$(find . -maxdepth 1 -name "${font_familyname}*.ttf" | head -n 1) if [ -z "${fontName_ttf}" ]; then echo "Error: ${font_familyname} not found" >&2 exit 1 @@ -228,7 +228,7 @@ fi # cmap GSUB 以外のテーブル更新 ---------- if [ "${other_flag}" = "true" ]; then - find . -not -name "*.*.ttf" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.*.ttf" | \ grep -e "${font_familyname}.*\.ttf$" | while read P do ttx -t name -t head -t OS/2 -t post -t hmtx "$P" # フォントスタイル判定のため、name テーブルも取得 @@ -283,7 +283,7 @@ if [ "${other_flag}" = "true" ]; then rm -f ${font_familyname}*.orig.ttf rm -f ${font_familyname}*.ttx.bak - find . -not -name "*.*.ttx" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.*.ttx" | \ grep -e "${font_familyname}.*\.ttx$" | while read P do mv "$P" "${P%%.ttx}.others.ttx" @@ -295,7 +295,7 @@ if [ "${cmap_flag}" = "true" ]; then if [ "${reuse_list_flag}" = "false" ]; then rm -f ${cmapList}.txt fi - cmaplist_txt=$(find . -name "${cmapList}.txt" -maxdepth 1 | head -n 1) + cmaplist_txt=$(find . -maxdepth 1 -name "${cmapList}.txt" | head -n 1) if [ -z "${cmaplist_txt}" ]; then # cmapListが無ければ作成 if [ "${leaving_tmp_flag}" = "true" ]; then ./uvs_table_maker.sh -l -N "${font_familyname}" @@ -304,7 +304,7 @@ if [ "${cmap_flag}" = "true" ]; then fi fi - find . -not -name "*.*.ttf" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.*.ttf" | \ grep -e "${font_familyname}.*\.ttf$" | while read P do ttx -t cmap "$P" @@ -321,7 +321,7 @@ if [ "${cmap_flag}" = "true" ]; then rm -f ${font_familyname}*.orig.ttf rm -f ${font_familyname}*.ttx.bak - find . -not -name "*.*.ttx" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.*.ttx" | \ grep -e "${font_familyname}.*\.ttx$" | while read P do mv "$P" "${P%%.ttx}.cmap.ttx" @@ -334,7 +334,7 @@ if [ "${gsub_flag}" = "true" ]; then # caltListを作り直す場合は今ある rm -f ${caltListName}*.txt fi - find . -not -name "*.*.ttf" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.*.ttf" | \ grep -e "${font_familyname}.*\.ttf$" | while read P do calt_ok_flag="true" # calt不対応の場合は後でfalse @@ -347,7 +347,7 @@ if [ "${gsub_flag}" = "true" ]; then # caltListを作り直す場合は今ある echo "Compatible with calt feature." # フォントがcaltフィーチャに対応していた場合 # caltテーブル加工用ファイルの作成 if [ "${calt_insert_flag}" = "true" ]; then - gsublist_txt=$(find . -name "${gsubList}.txt" -maxdepth 1 | head -n 1) + gsublist_txt=$(find . -maxdepth 1 -name "${gsubList}.txt" | head -n 1) if [ -z "${gsublist_txt}" ]; then # gsubListが無ければ作成(calt_table_maker で使用するため) if [ "${leaving_tmp_flag}" = "true" ]; then ./uvs_table_maker.sh -l -N "${font_familyname}" @@ -355,14 +355,14 @@ if [ "${gsub_flag}" = "true" ]; then # caltListを作り直す場合は今ある ./uvs_table_maker.sh -N "${font_familyname}" fi fi - caltlist_txt=$(find . -name "${caltListName}*.txt" -maxdepth 1 | head -n 1) + caltlist_txt=$(find . -maxdepth 1 -name "${caltListName}*.txt" | head -n 1) if [ -z "${caltlist_txt}" ]; then # caltListが無ければ作成 option_format_cm opt_fg "" "${leaving_tmp_flag}" "${symbol_only_flag}" "${basic_only_flag}" "${optimize_flag}" ./calt_table_maker.sh -"${opt_fg}" fi # フィーチャリストを変更 sed -i.bak -e 's,FeatureTag value="zero",FeatureTag value="calt",' "${P%%.ttf}.ttx" # caltダミー(zero)を変更 - find . -name "${caltListName}*.txt" -maxdepth 1 | while read line # caltList(caltルックアップ)の数だけループ + find . -maxdepth 1 -name "${caltListName}*.txt" | while read line # caltList(caltルックアップ)の数だけループ do sed -i.bak -e "/Lookup index=\"${lookupIndex_calt}\"/{n;d;}" "${P%%.ttf}.ttx" # Lookup index="${lookupIndex_calt}"〜の中を削除 sed -i.bak -e "/Lookup index=\"${lookupIndex_calt}\"/{n;d;}" "${P%%.ttf}.ttx" @@ -447,7 +447,7 @@ if [ "${gsub_flag}" = "true" ]; then # caltListを作り直す場合は今ある fi rm -f ${font_familyname}*.ttx.bak - find . -not -name "*.*.ttx" -maxdepth 1 | \ + find . -maxdepth 1 -not -name "*.*.ttx" | \ grep -e "${font_familyname}.*\.ttx$" | while read P do mv "$P" "${P%%.ttx}.GSUB.ttx" diff --git a/uvs_table_maker.sh b/uvs_table_maker.sh index 08d23bb..2f8ec47 100755 --- a/uvs_table_maker.sh +++ b/uvs_table_maker.sh @@ -98,7 +98,7 @@ if [ -z "${fromFontName_ttf}" ]; then echo "Error: ${fromFontName} not found" >&2 exit 1 fi -toFontName_ttf=$(find . -name "${toFontName}.ttf" -maxdepth 1 | head -n 1) +toFontName_ttf=$(find . -maxdepth 1 -name "${toFontName}.ttf" | head -n 1) if [ -z "${toFontName_ttf}" ]; then echo "Error: ${toFontName} not found" >&2 exit 1