diff options
Diffstat (limited to 'lib.m4')
-rw-r--r-- | lib.m4 | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -4,8 +4,14 @@ m4_changequote([,]) m4_dnl Output ‘$2’ if the country code matches ‘$1’ m4_define(__ifcode, [m4_ifelse(__code, [$1], [$2])]) +m4_dnl Output ‘$1’ if the country with code ‘__code’ has extra coins +m4_define(__ifextra, [ + m4_syscmd(grep -iq '^__code' data/extras) + m4_ifelse(m4_sysval, 0, [$1]) +]) + m4_dnl Execute the script ‘$1’ in the ‘scripts/’ directory -m4_define(__esyscmd, [m4_esyscmd([scripts/$1])]) +m4_define(__esyscmd, [m4_esyscmd([scripts/$*])]) m4_dnl Include the file ‘$1’ in the ‘src/’ directory, while also keeping track m4_dnl of who called ‘__include’. This is required sometimes when expanding @@ -52,3 +58,7 @@ m4_define(__entry, [ } } ]) + +m4_define(__tr, [__esyscmd(tr "$*")]) + +m4_define(__stats, [__esyscmd(completion __code $1 $2)])
\ No newline at end of file |