dot

packages and services management
Log | Files | Refs | README

commit d1313c897c24fea5ee80a7bea5cc52fb9816f45d
parent a52fd2c743ce173c0e9e9f7044de70004bf0b913
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 23 Jan 2018 01:38:42 +0100

remove unused awk scripts

Diffstat:
Mbin/back | 7+++++--
Mbin/blawk | 14++++----------
Dbin/drawk | 46----------------------------------------------
Mbin/irc | 3++-
Mbin/xdg-open | 5+++++
Dpack/execline/build | 11-----------
Dpack/execline/git | 1-
Apack/ff2txt/git | 1+
Dpack/libskarnet/build | 11-----------
Dpack/libskarnet/git | 1-
Dpack/s6/build | 12------------
Dpack/s6/git | 1-
12 files changed, 17 insertions(+), 96 deletions(-)

diff --git a/bin/back b/bin/back @@ -15,8 +15,11 @@ case $1 in -exec test "$log" -nt {} ';' \ -exec grep -F {} "$log" ';' -o \ -exec $sum {} + \ - ')' | tee "$BACK/new" | while read -r hash path - do [ -f "$BACK/obj/$hash.lz4" ] || lz4 -q "$path" "$BACK/obj/$hash.lz4" + ')' | tee "$BACK/new" | + while read -r hash path + do + [ -f "$BACK/obj/$hash.lz4" ] || + lz4 -q "$path" "$BACK/obj/$hash.lz4" done sort "$BACK/new" -o "$BACK/new" diff --git a/bin/blawk b/bin/blawk @@ -1,11 +1,6 @@ -#!/bin/awk -f -# ▌ ▜ ▌ -# ▛▌▐ ▀▌▌▌▌▙▘ -# ▙▌▐▖█▌▚▚▘▛▖ - Draw an image using block characters and ImageMagick -#=============================================================================== - -# USAGE: -# blawk [columns lines] file [imagemagick_arguments] +#!/usr/bin/awk -f +# Draw an image using block characters and ImageMagick +# blawk [columns lines] file [imagemagick_arguments] BEGIN { if (ARGC <= 3) { @@ -46,4 +41,4 @@ BEGIN { } print "" } -}- \ No newline at end of file +} diff --git a/bin/drawk b/bin/drawk @@ -1,45 +0,0 @@ -#!/bin/awk -f -# ▌ ▌ -# ▛▌▛▘▀▌▌▌▌▙▘ -# ▙▌▌ █▌▚▚▘▛▖ - Drawille implementation in awk (just for image conversions). -#=============================================================================== - -# USAGE: -# blawk [columns lines] file [imagemagick_arguments] - -BEGIN { - if (ARGC <= 3) { - convert = "convert "ARGV[1]" -compress none "ARGV[2] \ - " pbm:- | sed -e 's/ //g' -ne '3,$ p'"; - } else { - convert = "convert "ARGV[3]" -compress none "ARGV[4] \ - " -resize "ARGV[1] * 2"x"ARGV[2] * 4 \ - " pbm:- | sed -e 's/ //g' -ne '3,$ p'"; - } - - while ((convert | getline) > 0 ) { - - # Get lines by group of 4 - line[1] = $0; - convert | getline; line[2] = $0; - convert | getline; line[3] = $0; - convert | getline; line[4] = $0; - - # For each character to be drawn - for (i = 0; 2 * i < length(line[1]); i++) { - # Char number = initial offset + - # Sum of characters offsets * 0 or 1 on the grid - printf("%c", 10240 \ - + 1 * substr(line[1], 2 * i , 1) \ - + 8 * substr(line[1], 2 * i + 1, 1) \ - + 2 * substr(line[2], 2 * i , 1) \ - + 16 * substr(line[2], 2 * i + 1, 1) \ - + 4 * substr(line[3], 2 * i , 1) \ - + 32 * substr(line[3], 2 * i + 1, 1) \ - + 64 * substr(line[4], 2 * i , 1) \ - + 128 * substr(line[4], 2 * i + 1, 1)); - } - print "" - } - close(cmd) -}- \ No newline at end of file diff --git a/bin/irc b/bin/irc @@ -42,7 +42,8 @@ do ;; (*) if [ "$key" -ge 41 ] && [ "$key" -lt 177 ] || [ "$key" -eq 40 ] - then printf "\\$key" >> "$INPUT" + then + printf "\\$key" >> "$INPUT" fi ;; esac diff --git a/bin/xdg-open b/bin/xdg-open @@ -120,6 +120,11 @@ case $scheme in curl -Lo "$HOME/lib/http/text/$host/${path##*/}" "$1" exec "$0" "$HOME/lib/http/text/$host/${path##*/}" ;; + (*.gz|*.bz2|*.xz|*.tgz|*.tgz|*.tbz2|*.txz) + mkdir -p "$HOME/tmp/${path##*/}" "$1" + curl -Lo + exec "$0" "$HOME/tmp/${path##*/}" + ;; (*) exec firefox "$1" ;; diff --git a/pack/execline/build b/pack/execline/build @@ -1,11 +0,0 @@ -#!/bin/sh -e - -case "$(uname)" in (*BSD) make=gmake ;; (Linux) make=make ;; esac - -./configure --prefix="$OPT" \ - --with-sysdeps="$SYSROOT/lib/skalibs/sysdeps/" \ - --with-include="$SYSROOT/include" \ - --with-lib="$SYSROOT/lib/skalibs" \ - --with-dynlib="$SYSROOT/lib/skalibs" - -$make install diff --git a/pack/execline/git b/pack/execline/git @@ -1 +0,0 @@ -git://git.skarnet.org/execline diff --git a/pack/ff2txt/git b/pack/ff2txt/git @@ -0,0 +1 @@ +git://josuah.net:9000/ff2txt.git diff --git a/pack/libskarnet/build b/pack/libskarnet/build @@ -1,11 +0,0 @@ -#!/bin/sh -e - -case "$(uname)" in (*BSD) make=gmake ;; (Linux) make=make ;; esac - -./configure --prefix="$OPT" \ - --with-sysdeps="$SYSROOT/lib/skalibs/sysdeps/" \ - --with-include="$SYSROOT/include" \ - --with-lib="$SYSROOT/lib" \ - --with-dynlib="$SYSROOT/lib" - -$make install diff --git a/pack/libskarnet/git b/pack/libskarnet/git @@ -1 +0,0 @@ -git://git.skarnet.org/skalibs diff --git a/pack/s6/build b/pack/s6/build @@ -1,12 +0,0 @@ -#!/bin/sh -e - -case "$(uname)" in (*BSD) make=gmake ;; (Linux) make=make ;; esac - -./configure --prefix="$OPT" \ - --with-sysdeps="$SYSROOT/lib/skalibs/sysdeps/" \ - --with-include="$SYSROOT/include" \ - --with-lib="$SYSROOT/lib/skalibs" \ - --with-lib="$SYSROOT/lib/execline" \ - --with-dynlib="$SYSROOT/lib/skalibs" - -$make install diff --git a/pack/s6/git b/pack/s6/git @@ -1 +0,0 @@ -git://git.skarnet.org/s6