dot

packages and services management
Log | Files | Refs | README

commit 23ec137524ebcdb9a83a3785f5d47c524f64c6d2
parent deb83191f9467a723205882784cb5df66016db57
Author: Josuah Demangeon⠠⠵ <mail@josuah.net>
Date:   Thu,  6 Apr 2017 13:31:07 +0200

Added everything back

Diffstat:
M.profile | 1-
Mbin/git-all | 0
Mbin/ii-filter | 27+++++++++++----------------
Mbin/io-path | 4++--
Mbin/srv-irc | 0
Minstall | 33++++++++++++++++-----------------
6 files changed, 29 insertions(+), 36 deletions(-)

diff --git a/.profile b/.profile @@ -46,7 +46,6 @@ alias j='jobs' # iomenu alias e='io-edit' -alias v='EDITOR="less -N" io-edit' alias a='io-abduco' alias r='io-run' alias f='find ! -path "*/.git/*" -type f | iomenu -l 255' diff --git a/bin/git-all b/bin/git-all diff --git a/bin/ii-filter b/bin/ii-filter @@ -1,6 +1,8 @@ -busybox awk -v COLS="${1:-80}" 'BEGIN { +busybox awk ' + +BEGIN { NICK_COL = 14; - TEXT_COL = COLS - NICK_COL - length(" | "); + TEXT_COL = 80 - NICK_COL - length(" "); } /^$/ { @@ -34,10 +36,9 @@ busybox awk -v COLS="${1:-80}" 'BEGIN { } if (nick != lastnick) - printf("%-" NICK_COL "s │\033[1;30m%" TEXT_COL "s\033[m\n", - "", date); + printf("%-" NICK_COL "s \n", date); - printf("%" NICK_COL "s │ ", + printf("%" NICK_COL "s ", (nick != lastnick && nick != "-!-") ? nick : ""); for (first = 1; length($0) >= TEXT_COL; first = 0) { @@ -46,21 +47,15 @@ busybox awk -v COLS="${1:-80}" 'BEGIN { $0 = substr($0, length(line) + 2); if (!first) - printf("%" NICK_COL "s │ ", ""); - - if (nick == "-!-") - printf("\033[1;30m"); + printf("%" NICK_COL "s ", ""); - printf("%s\033[m\n", line); + print(line); } if (!first) - printf("%" NICK_COL "s │ ", ""); - - if (nick == "-!-") - printf("\033[1;30m"); + printf("%" NICK_COL "s ", ""); - printf("%s\033[m\n", $0); + print($0); lastnick = nick; -}' +}' "$@" diff --git a/bin/io-path b/bin/io-path @@ -1,6 +1,6 @@ # prompt for a path recursively -if [ "$1" = '.' ] +if [ "$1" = './' ] then printf '%s' "$PWD" exit 0 @@ -15,4 +15,4 @@ then exit 0 fi -$0 "$(find . -maxdepth 1 | sed 's|^./||' | iomenu -p "$PWD")" || exit 1 +$0 "$(ls -ap | iomenu -p "$PWD")" || exit 1 diff --git a/bin/srv-irc b/bin/srv-irc diff --git a/install b/install @@ -1,11 +1,16 @@ -case "$1" in +usage() +{ + printf '%s [-l] [-g] [-m address host password] [-9]\n' "$0" + exit 1 +} -( l | link ) +case "$1" in +( -l ) [ $# = 1 ] || usage cd "${0%/*}" || exit 1 - find "$PWD" -path "$PWD/.*" ! -path '*/.git*' | while IFS='' read -r path + find "$PWD" -path "$PWD/.*" ! -path '$PWD/.git*' | while read -r path do [ -d "$path" ] && mkdir -p "$HOME/${path#$PWD/}" [ -f "$path" ] && ln -sf "$path" "$HOME/${path#$PWD/}" @@ -14,9 +19,7 @@ case "$1" in find -L ~ -type l -exec rm {} \; ;; - -( g | git ) - +( -g ) [ $# = 1 ] || usage mkdir -p ~/src && cd ~/src || exit git clone http://github.com/josuah/www & @@ -39,23 +42,19 @@ case "$1" in wait ;; - -( m | mail ) - +( -m ) [ $# = 4 ] || usage mkdir -p "$MAIL/cur" "$MAIL/new" "$MAIL/tmp" - printf '<address@mail.net> <imap.host.net> <password>:' - read -r a h p - printf '\033[A\033[2K' - printf 'machine %s\nlogin %s\npassword "%s"' "$h" "$a" "$p" > ~/.netrc + printf 'machine %s\nlogin %s\npassword "%s"' "$@" > ~/.netrc chmod 400 ~/.netrc ;; - -( 9 | plan9 ) - +( -9 ) [ $# = 1 ] || usage wget -O- http://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/plan9port/plan9port-20140306.tgz | tar -xzf - -C "$HOME" && mv plan9port 9 && cd 9 || exit 1 - ./INSTALL + ;; + +( '' | * ) usage + ;; esac