dot

packages and services management
Log | Files | Refs | README

commit 3f4c551f1ddf6247f4617afcbfe8df2072ae2ffb
parent 0437ca8f7da744253c97a697848d21dfeb57c5bc
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Thu, 17 Aug 2017 16:13:56 +0200

*/bin/*: fixed scripts

Diffstat:
Aii/bin/no | 8++++++++
Miomenu/bin/io-cache | 4++--
Mlib/url | 1+
Mman-openbsd/tar | 2+-
Mpkg/bin/pkg-tar | 12++++++------
Mshell/bin/80 | 2+-
Ashell/bin/fmt | 1+
Mshell/profile | 3++-
8 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/ii/bin/no b/ii/bin/no @@ -0,0 +1,8 @@ +printf 'I think it could be ok...\n' > "$1"; sleep 2 +printf ' thin it cou d b ok...\n' > "$1"; sleep 1 +printf ' h n t c b ok .\n' > "$1"; sleep 1 +printf ' n t c o .\n' > "$1"; sleep 1 +printf ' n c o .\n' > "$1"; sleep 1 +printf ' n o .\n' > "$1"; sleep 1 +printf ' n o .\n' > "$1"; sleep 1 +printf ' no.\n' > "$1"; sleep 1 diff --git a/iomenu/bin/io-cache b/iomenu/bin/io-cache @@ -10,7 +10,7 @@ find "$ROOT" \ awk -v MAIL="${MAIL%/*}" ' - $0 ~ ENVIRON["ROOT/var"] "/irc/.*/$" { + $0 ~ ENVIRON["ROOT"] "/var/irc/.*/$" { ircv[ircc++] = $0 } @@ -26,7 +26,7 @@ awk -v MAIL="${MAIL%/*}" ' searchv[searchc++] = $0 } - $0 ~ ROOT/var "/music" { + $0 ~ ENVIRON["ROOT"] "/var/music" { musicv[musicc++] = $0 } diff --git a/lib/url b/lib/url @@ -11,5 +11,6 @@ gopher://gopherproject.org gopher://port70.net gopher://tx.god.jp ssh://josuah@josuah.net +ssh://josuah@cyberia.systems ssh://josuahdemangeon@grex.org ssh://josuah@josuah.lxc.gandi.net diff --git a/man-openbsd/tar b/man-openbsd/tar @@ -1 +1 @@ -https://www.freebsd.org/cgi/man.cgi?manpath=openbsd +http://www.freebsd.org/cgi/man.cgi?apropos=2&manpath=OpenBSD+6.1.tar.gz diff --git a/pkg/bin/pkg-tar b/pkg/bin/pkg-tar @@ -1,8 +1,8 @@ read tar < "$ROOT/pkg/$1/tar" || exit 1 -[ -e "$ROOT/pkg/$1" ] && exit 1 +[ -e "$ROOT/src/$1" ] && exit 1 -mkdir -p "$ROOT/pkg/$1" && cd "$ROOT/pkg/$1" +mkdir -p "$ROOT/src/$1" && cd "$ROOT/src/$1" wget -O - "$tar" | case "$tar" in (*.tar.bz2 | *.tbz2) bunzip2 -d ;; @@ -11,10 +11,10 @@ wget -O - "$tar" | case "$tar" in (*.tar ) tee ;; esac | tar -xf - -if [ $(ls "$ROOT/pkg/$1" | wc -l) = 1 ] +if [ "$(ls "$ROOT/pkg/$1" | wc -l | tr -cd 0-9)" = 1 ] then dir=$(ls "$ROOT/pkg/$1") - find "$ROOT/pkg/$1" -mindepth 2 -maxdepth 2 \ - -exec mv {} "$ROOT/pkg/$1" ';' - rmdir "$ROOT/pkg/$1/$dir" + find "$ROOT/src/$1" -mindepth 2 -maxdepth 2 \ + -exec mv {} "$ROOT/src/$1" ';' + rmdir "$ROOT/src/$1/$dir" fi diff --git a/shell/bin/80 b/shell/bin/80 @@ -10,4 +10,4 @@ BEGIN { ARGC = 1 } print line } -' - "${1:-=}" +' - "${1:--}" diff --git a/shell/bin/fmt b/shell/bin/fmt @@ -0,0 +1 @@ +tr '\n' ' ' | fold -w 80 -s | sed 's/ *$//' diff --git a/shell/profile b/shell/profile @@ -9,7 +9,6 @@ PS3=' : ' alias cl='printf "\033[H\033[2J"' -export TERMCAP="$TERM_CAP" export NAME='Josuah Demangeon' export TZ='Europe/Paris' export NICK='josuah' @@ -18,3 +17,5 @@ export EMAIL='mail@josuah.net' export EDITOR=vim VISUAL=$EDITOR export PAGER=less MANPAGER=$PAGER + +export TERM=vt320