aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-27 06:24:39 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-27 06:24:39 +0300
commit043cbafd3b0228a2d917027d2a54e893e1f897bf (patch)
tree0bb55747a7de8403530bf0e38e0c931223e64b49
parentcode style (diff)
downloadlinux-home-043cbafd3b0228a2d917027d2a54e893e1f897bf.tar.gz
linux-home-043cbafd3b0228a2d917027d2a54e893e1f897bf.zip
.bashrc_pgn: export to another project
-rw-r--r--.bashrc1
-rw-r--r--.bashrc_pgn38
2 files changed, 0 insertions, 39 deletions
diff --git a/.bashrc b/.bashrc
index 60ccb4f..bc4924d 100644
--- a/.bashrc
+++ b/.bashrc
@@ -214,6 +214,5 @@ PYTHONSTARTUP="$HOME/.pythonrc"
[ -f '.bashrc_distr' ] && source .bashrc_distr
[ -f '.bashrc_git' ] && source .bashrc_git
[ -f '.bashrc_netwrix' ] && source .bashrc_netwrix
-[ -f '.bashrc_pgn' ] && source .bashrc_pgn
[ -f '.bashrc_text' ] && source .bashrc_text
[ -f ".bashrc_third_party" ] && source .bashrc_third_party
diff --git a/.bashrc_pgn b/.bashrc_pgn
deleted file mode 100644
index 4e73e76..0000000
--- a/.bashrc_pgn
+++ /dev/null
@@ -1,38 +0,0 @@
-[ ! -z "${BASHRC_PGN+x}" ] && return || readonly BASHRC_PGN=1
-
-source .bashrc_text
-
-alias strip_pgn_clk='sed --binary --in-place '"'"'s/ {\[%clk [[:digit:]]\+:[[:digit:]]\+\(:[[:digit:]]\+\)*\]}//g'"'"
-alias slice_pgn_moves='sed --binary --in-place '"'"'s/ \([[:digit:]]\+\.\)/\n\1/g'"'"
-
-normalize_pgn() {
- dos2eol "$@" \
- && lint "$@" \
- && strip_pgn_clk "$@" \
- && slice_pgn_moves "$@" \
- && eol2dos "$@"
-}
-
-append_pgn() {
- if [ "$#" -ne 2 ]; then
- echo "usage: $FUNCNAME DEST_PGN SRC_PGN" >&2
- return 1
- fi
-
- printf '\r\n' >> "$1" \
- && cat "$2" >> "$1"
-}
-
-join_pgns() (
- [ "$#" -eq 0 ] && return
-
- set -o errexit
-
- cat "$1"
-
- local i
- for i in "${@:2}"; do
- printf '\r\n'
- cat "$i"
- done
-)