From b1137539d0195b929d6d3b4a2576919ea5e58e03 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 2 Aug 2016 19:30:07 +1200 Subject: kvlt(6)/zs(6) get shebangs from shb(1) at build --- .gitignore | 2 ++ Makefile | 12 ++++++++- games/kvlt | 78 ---------------------------------------------------------- games/kvlt.sed | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ games/zs | 8 ------ games/zs.sed | 7 ++++++ 6 files changed, 97 insertions(+), 87 deletions(-) delete mode 100755 games/kvlt create mode 100644 games/kvlt.sed delete mode 100755 games/zs create mode 100644 games/zs.sed diff --git a/.gitignore b/.gitignore index b5b1bf83..e6098c28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +games/kvlt +games/zs git/gitconfig gnupg/gpg.conf man/man7/dotfiles.7 diff --git a/Makefile b/Makefile index 4a41fd03..c863b17a 100644 --- a/Makefile +++ b/Makefile @@ -63,12 +63,22 @@ all : git/gitconfig gnupg/gpg.conf clean distclean : rm -f \ + games/kvlt \ + games/zs \ git/gitconfig \ gnupg/gpg.conf \ man/man7/dotfiles.7 \ mutt/muttrc \ tmux/tmux.conf +games/kvlt : games/kvlt.sed + bin/shb games/kvlt.sed sed -f > "$@" + chmod +x "$@" + +games/zs : games/zs.sed + bin/shb games/zs.sed sed -f > "$@" + chmod +x "$@" + git/gitconfig : git/gitconfig.m4 m4 \ -D DOTFILES_NAME="$(NAME)" \ @@ -159,7 +169,7 @@ install-finger : install -pm 0644 -- finger/project "$(HOME)"/.project install -pm 0644 -- finger/pgpkey "$(HOME)"/.pgpkey -install-games : test-games install-games-man +install-games : games/kvlt games/zs test-games install-games-man install -m 0755 -d -- "$(HOME)"/.local/games install -m 0755 -- games/* "$(HOME)"/.local/games diff --git a/games/kvlt b/games/kvlt deleted file mode 100755 index e10b0f9d..00000000 --- a/games/kvlt +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sed -f -# Type like a young black metal enthusiast - -# Lowercase to capitals -y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ - -# Pad the start and end of the line temporarily to work around GNU sed(1) not -# respecting POSIX word boundaries, leaving us with no compatible options -s/^/~/ -s/$/~/ - -# Various words for KVLT -s,\([^A-Z]\)ASSOCIATION\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)BUSINESS\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)CLUB\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)COMPANY\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)FOUNDATION\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)GROUP\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)INSTITUTE\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)INSTITUTION\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)ORGANIZATION\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)PARTY\([^A-Z]\),\1KVLT\2,g -s,\([^A-Z]\)RELIGION\([^A-Z]\),\1KVLT\2,g - -# Various words for TRUE -s,\([^A-Z]\)AWESOME\([^A-Z]\),\1TRUE\2,g -s,\([^A-Z]\)BEST\([^A-Z]\),\1TRUEST\2,g -s,\([^A-Z]\)EXCELLENT\([^A-Z]\),\1TRUE\2,g -s,\([^A-Z]\)GOOD\([^A-Z]\),\1TRUE\2,g -s,\([^A-Z]\)GREAT\([^A-Z]\),\1TRUE\2,g -s,\([^A-Z]\)NICE\([^A-Z]\),\1TRUE\2,g - -# WAR -> KRIEG -s,\([^A-Z]\)WAR\([^A-Z]\),\1KRIEG\2,g - -# Double-letters are easy -s,CC,KK,g -s,SS,ZZ,g - -# CHR -> KHR -s,CHR,KHR,g - -# -C[EIY] -> -Z (naïve attempt at finding soft Cs) -s,C\([EIY]\),Z\1,g - -# -C[^H] -> -K (so "change" doesn't become "KHANGE") -s,C\([^H]\),K\1,g - -# -S[^H] -> Z (so "sharp" doesn't become "ZHARP") -s,S\([^H]\),Z\1,g - -# consant-I-consonant -> -Y- -s,\([B-DF-HJ-NP-TV-XZ]\)I\([B-DF-HJ-NP-TV-XZ]\),\1Y\2,g - -# consant-U-consonant -> -V- -s,\([B-DF-HJ-NP-TV-XZ]\)U\([B-DF-HJ-NP-TV-XZ]\),\1V\2,g - -# THE -> DER -s,\([^A-Z]\)THE\([^A-Z]\),\1DER\2,g - -# OF -> 0V -s,\([^A-Z]\)OF\([^A-Z]\),\10V\2,g - -# AND -> VND -s,\([^A-Z]\)AND\([^A-Z]\),\1VND\2,g - -# TRUE -> TRV -s,\([^A-Z]\)TRUE\([^A-Z]\),\1TRV\2,g - -# All numbers become 666 -s,[0-9][0-9]*,666,g - -# Remove the padding established above -s/^~// -s/~$// - -# O->0 -y/O/0/ diff --git a/games/kvlt.sed b/games/kvlt.sed new file mode 100644 index 00000000..1cb06b5a --- /dev/null +++ b/games/kvlt.sed @@ -0,0 +1,77 @@ +# Type like a young black metal enthusiast + +# Lowercase to capitals +y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ + +# Pad the start and end of the line temporarily to work around GNU sed(1) not +# respecting POSIX word boundaries, leaving us with no compatible options +s/^/~/ +s/$/~/ + +# Various words for KVLT +s,\([^A-Z]\)ASSOCIATION\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)BUSINESS\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)CLUB\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)COMPANY\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)FOUNDATION\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)GROUP\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)INSTITUTE\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)INSTITUTION\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)ORGANIZATION\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)PARTY\([^A-Z]\),\1KVLT\2,g +s,\([^A-Z]\)RELIGION\([^A-Z]\),\1KVLT\2,g + +# Various words for TRUE +s,\([^A-Z]\)AWESOME\([^A-Z]\),\1TRUE\2,g +s,\([^A-Z]\)BEST\([^A-Z]\),\1TRUEST\2,g +s,\([^A-Z]\)EXCELLENT\([^A-Z]\),\1TRUE\2,g +s,\([^A-Z]\)GOOD\([^A-Z]\),\1TRUE\2,g +s,\([^A-Z]\)GREAT\([^A-Z]\),\1TRUE\2,g +s,\([^A-Z]\)NICE\([^A-Z]\),\1TRUE\2,g + +# WAR -> KRIEG +s,\([^A-Z]\)WAR\([^A-Z]\),\1KRIEG\2,g + +# Double-letters are easy +s,CC,KK,g +s,SS,ZZ,g + +# CHR -> KHR +s,CHR,KHR,g + +# -C[EIY] -> -Z (naïve attempt at finding soft Cs) +s,C\([EIY]\),Z\1,g + +# -C[^H] -> -K (so "change" doesn't become "KHANGE") +s,C\([^H]\),K\1,g + +# -S[^H] -> Z (so "sharp" doesn't become "ZHARP") +s,S\([^H]\),Z\1,g + +# consant-I-consonant -> -Y- +s,\([B-DF-HJ-NP-TV-XZ]\)I\([B-DF-HJ-NP-TV-XZ]\),\1Y\2,g + +# consant-U-consonant -> -V- +s,\([B-DF-HJ-NP-TV-XZ]\)U\([B-DF-HJ-NP-TV-XZ]\),\1V\2,g + +# THE -> DER +s,\([^A-Z]\)THE\([^A-Z]\),\1DER\2,g + +# OF -> 0V +s,\([^A-Z]\)OF\([^A-Z]\),\10V\2,g + +# AND -> VND +s,\([^A-Z]\)AND\([^A-Z]\),\1VND\2,g + +# TRUE -> TRV +s,\([^A-Z]\)TRUE\([^A-Z]\),\1TRV\2,g + +# All numbers become 666 +s,[0-9][0-9]*,666,g + +# Remove the padding established above +s/^~// +s/~$// + +# O->0 +y/O/0/ diff --git a/games/zs b/games/zs deleted file mode 100755 index 728156ba..00000000 --- a/games/zs +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sed -f -# Prepend z appropriately to occurrences of s, in order to make fun of bezrend -s,^s,zs,g -s,^S\([a-z]\),Zs\1,g -s,^s,ZS,g -s,\([^zZ]\)s,\1zs,g -s,\([^zZ]\)S\([a-z]\),\1Zs\2,g -s,\([^zZ]\)S,\1ZS,g diff --git a/games/zs.sed b/games/zs.sed new file mode 100644 index 00000000..3d64b4ea --- /dev/null +++ b/games/zs.sed @@ -0,0 +1,7 @@ +# Prepend z appropriately to occurrences of s, in order to make fun of bezrend +s,^s,zs,g +s,^S\([a-z]\),Zs\1,g +s,^s,ZS,g +s,\([^zZ]\)s,\1zs,g +s,\([^zZ]\)S\([a-z]\),\1Zs\2,g +s,\([^zZ]\)S,\1ZS,g -- cgit v1.2.3