dot

packages and services management
Log | Files | Refs | README

commit d0d652b9f9aea032364ac6f2e9bf908b41c7f867
parent e748b089e117ccfa879a219d36a6e17535c46290
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 22 Nov 2018 23:03:29 +0100

Merge branch 'master' of git://git.josuah.net/dot

Diffstat:
Mbin/menu-mail | 2+-
Mbin/open | 38+++++++++++++++++++-------------------
Mbin/service-status | 2+-
Mdot/config/open/protocol/9p | 10+++++-----
Mdot/config/open/protocol/ftp | 6++++--
Mdot/config/open/protocol/git | 20++++++++++++--------
Mdot/config/open/protocol/gopher | 6++++--
Apack/darknet/build | 15+++++++++++++++
Apack/darknet/dependencies/gmake | 2++
Apack/darknet/git | 1+
Apack/darknet/homepage | 1+
Apack/darknet/version | 1+
Apack/hurl/build | 8++++++++
Apack/hurl/dependencies/libressl | 2++
Apack/hurl/git | 1+
Apack/hurl/version | 1+
Ds6/qmail-send/x/conf/bouncefrom | 0
Ds6/qmail-send/x/conf/bouncehost | 0
Ds6/qmail-send/x/conf/concurrencylocal | 0
Ds6/qmail-send/x/conf/concurrencyremote | 0
Ds6/qmail-send/x/conf/doublebouncehost | 0
Ds6/qmail-send/x/conf/doublebounceto | 0
Ds6/qmail-send/x/conf/envnoathost | 0
Ds6/qmail-send/x/conf/helohost | 0
Ms6/qmail-send/x/conf/locals | 1+
As6/qmail-send/x/conf/me | 1+
Ds6/qmail-send/x/conf/percenthack | 0
Ds6/qmail-send/x/conf/queuelifetime | 0
Ds6/qmail-send/x/conf/smtproutes | 0
Ds6/qmail-send/x/conf/timeoutconnect | 0
Ds6/qmail-send/x/conf/timeoutremote | 0
Ds6/qmail-send/x/conf/virtualdomains | 0
As6/qmail-smtpd/josuah.net/env/CERTFILE | 1+
As6/qmail-smtpd/josuah.net/env/KEYFILE | 1+
Ds6/qmail-smtpd/x/conf/.qmail-mail | 1-
Ds6/qmail-smtpd/x/conf/.qmail-postmaster | 1-
Ds6/qmail-smtpd/x/conf/.qmail-root | 1-
Ds6/qmail-smtpd/x/conf/localiphost | 0
Ds6/qmail-smtpd/x/conf/morercpthosts | 0
Ds6/qmail-smtpd/x/conf/smtpgreeting | 0
40 files changed, 82 insertions(+), 41 deletions(-)

diff --git a/bin/menu-mail b/bin/menu-mail @@ -9,4 +9,4 @@ multisubstitute { backtick -n x { pipeline { ls $maildir } menu } importas dir x -mail-list $dir +mail-scan $dir diff --git a/bin/open b/bin/open @@ -1,30 +1,30 @@ #!/usr/bin/env execlineb elgetpositionals -P 1 -backtick -n x { whoami } importas user x -backtick -n x { homeof $user } importas home x -backtick -n x { pipeline { echo $1 } sed "s/.*\\.//" } importas extension x -importas -D ${home}/.config/open OPEN OPEN - -define regex "([^@:/#]+)://(([^@:/#]*)@)?([^:/#]*)?(:([^/#]*))?(/([^#]*))?(#.*)?" -pipeline { heredoc 0 $1 sed -r "s,${regex},\\1\\n\\2\\n\\4\\n\\6\\n\\8," } -backtick -n x { read } importas protocol x -backtick -n host { read } -backtick -n port { read } -backtick -n file { read } +backtick -n x { whoami } importas USER x +backtick -n x { homeof $USER } importas HOME x +importas -D ${HOME}/.config/open OPEN OPEN +cd $OPEN redirfd -r 0 /dev/tty redirfd -w 1 /dev/tty -ifelse { if { test $protocol } test -e ${OPEN}/protocol/${protocol} } - { ${OPEN}/protocol/${protocol} $1 } +backtick -n x { heredoc 0 $1 sed "s|.*\\.||" } importas extension x +backtick -n x { heredoc 0 $1 sed "s|://.*||" } importas protocol x -ifelse { if { test $extension } test -e ${OPEN}/extension/${extension} } - { ${OPEN}/extension/${extension} $1 } +define regex "[^@:/#]+://(([^@:/#]*)@)?([^:/#]*)?(:([^/#]*))?(/([^#]*))?(#(.*))?" +backtick x { heredoc 0 $1 sed -r "s,${regex},\\2\\n\\3\\n\\5\\n\\7\\n\\9," } +importas -s -d "\n" uri x -ifelse { if { test -d $1 } test -e ${OPEN}/file } - { ${OPEN}/file $1 } +ifelse { if { test $protocol } test -e protocol/$protocol } + { protocol/$protocol $1 $uri } -ifelse { if { test -f $1 } test -e ${OPEN}/file } - { ${OPEN}/file $1 } +ifelse { if { test $extension } test -e extension/$extension } + { extension/$extension $1 } + +ifelse { if { test -d $1 } test -e file } + { file $1 } + +ifelse { if { test -f $1 } test -e file } + { file $1 } foreground { echo no handler found for $1 } exit 2 diff --git a/bin/service-status b/bin/service-status @@ -7,4 +7,4 @@ if { s6-svstat /run/s6/$name } if { printf "\n" } if { backtick -n x { s6-svstat -o pid /run/s6/$name } importas x x ptree $x } if { printf "\n" } -if { tail /var/log/${name}/current } +pipeline { tail /var/log/${name}/current } s6-tai64nlocal diff --git a/dot/config/open/protocol/9p b/dot/config/open/protocol/9p @@ -1,5 +1,5 @@ -#!/bin/sh -e - -dir=/mnt/9p/$host -mkdir -p "$dir" -exec 9pfs "$host" "$dir" +#!/usr/bin/env execlineb +importas host 3 +define dir /mnt/9p/$host +mkdir -p $dir +exec 9pfs $host $dir diff --git a/dot/config/open/protocol/ftp b/dot/config/open/protocol/ftp @@ -1,2 +1,4 @@ -#!/bin/sh -e -exec ftp "$1" +#!/usr/bin/env execlineb +importas uri 1 + +ftp $1 diff --git a/dot/config/open/protocol/git b/dot/config/open/protocol/git @@ -1,8 +1,12 @@ -#!/bin/sh -e -dir=$HOME/git/$host -case $1 in (*github.com*|*bitbucket.com*) - dir=$dir/$(dirname "$file") -esac -mkdir -p "$dir" -cd $dir -exec git clone "$1" +#!/usr/bin/env execlineb +backtick -n x { whoami } importas USER x +backtick -n x { homeof $USER } importas HOME x +importas uri 1 +importas host 3 +importas repo 5 + +backtick -n x { dirname ${HOME}/git/${host}/${repo} } importas dir x +if { mkdir -p $dir } cd $dir +if { echo $dir } + +git clone $uri diff --git a/dot/config/open/protocol/gopher b/dot/config/open/protocol/gopher @@ -1,2 +1,4 @@ -#!/bin/sh -e -exec sacc "$1" +#!/usr/bin/env execlineb +importas uri 1 + +sacc $uri diff --git a/pack/darknet/build b/pack/darknet/build @@ -0,0 +1,15 @@ +#!/bin/sh -e + +sed '2 s,.*,#include <sys/select.h>,' examples/go.c >$$ +mv $$ examples/go.c + +sed ' + s/-Wfatal-errors//g + s/-Ofast//g + s/-Wno-unused-result//g +' Makefile >$$ +mv $$ Makefile + +gmake +mkdir -p "$PREFIX/bin" +cp darknet "$PREFIX/bin" diff --git a/pack/darknet/dependencies/gmake b/pack/darknet/dependencies/gmake @@ -0,0 +1 @@ +../../gmake/version+ \ No newline at end of file diff --git a/pack/darknet/git b/pack/darknet/git @@ -0,0 +1 @@ +git://github.com/pjreddie/darknet diff --git a/pack/darknet/homepage b/pack/darknet/homepage @@ -0,0 +1 @@ +https://pjreddie.com/darknet/ diff --git a/pack/darknet/version b/pack/darknet/version @@ -0,0 +1 @@ +git diff --git a/pack/hurl/build b/pack/hurl/build @@ -0,0 +1,8 @@ +#!/bin/sh -ex + +export LDFLAGS="-L$libressl/lib -lssl -lcrypto" +export CFLAGS="-I$libressl/include" +export PREFIX="$PREFIX" + +make options CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" PREFIX="$PREFIX" +make install CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" PREFIX="$PREFIX" diff --git a/pack/hurl/dependencies/libressl b/pack/hurl/dependencies/libressl @@ -0,0 +1 @@ +../../libressl/version+ \ No newline at end of file diff --git a/pack/hurl/git b/pack/hurl/git @@ -0,0 +1 @@ +git://git.codemadness.org/hurl diff --git a/pack/hurl/version b/pack/hurl/version @@ -0,0 +1 @@ +git diff --git a/s6/qmail-send/x/conf/bouncefrom b/s6/qmail-send/x/conf/bouncefrom diff --git a/s6/qmail-send/x/conf/bouncehost b/s6/qmail-send/x/conf/bouncehost diff --git a/s6/qmail-send/x/conf/concurrencylocal b/s6/qmail-send/x/conf/concurrencylocal diff --git a/s6/qmail-send/x/conf/concurrencyremote b/s6/qmail-send/x/conf/concurrencyremote diff --git a/s6/qmail-send/x/conf/doublebouncehost b/s6/qmail-send/x/conf/doublebouncehost diff --git a/s6/qmail-send/x/conf/doublebounceto b/s6/qmail-send/x/conf/doublebounceto diff --git a/s6/qmail-send/x/conf/envnoathost b/s6/qmail-send/x/conf/envnoathost diff --git a/s6/qmail-send/x/conf/helohost b/s6/qmail-send/x/conf/helohost diff --git a/s6/qmail-send/x/conf/locals b/s6/qmail-send/x/conf/locals @@ -0,0 +1 @@ +localhost diff --git a/s6/qmail-send/x/conf/me b/s6/qmail-send/x/conf/me @@ -0,0 +1 @@ +localhost diff --git a/s6/qmail-send/x/conf/percenthack b/s6/qmail-send/x/conf/percenthack diff --git a/s6/qmail-send/x/conf/queuelifetime b/s6/qmail-send/x/conf/queuelifetime diff --git a/s6/qmail-send/x/conf/smtproutes b/s6/qmail-send/x/conf/smtproutes diff --git a/s6/qmail-send/x/conf/timeoutconnect b/s6/qmail-send/x/conf/timeoutconnect diff --git a/s6/qmail-send/x/conf/timeoutremote b/s6/qmail-send/x/conf/timeoutremote diff --git a/s6/qmail-send/x/conf/virtualdomains b/s6/qmail-send/x/conf/virtualdomains diff --git a/s6/qmail-smtpd/josuah.net/env/CERTFILE b/s6/qmail-smtpd/josuah.net/env/CERTFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/fullchain.pem diff --git a/s6/qmail-smtpd/josuah.net/env/KEYFILE b/s6/qmail-smtpd/josuah.net/env/KEYFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/privkey.pem diff --git a/s6/qmail-smtpd/x/conf/.qmail-mail b/s6/qmail-smtpd/x/conf/.qmail-mail @@ -1 +0,0 @@ -josuah diff --git a/s6/qmail-smtpd/x/conf/.qmail-postmaster b/s6/qmail-smtpd/x/conf/.qmail-postmaster @@ -1 +0,0 @@ -josuah diff --git a/s6/qmail-smtpd/x/conf/.qmail-root b/s6/qmail-smtpd/x/conf/.qmail-root @@ -1 +0,0 @@ -josuah diff --git a/s6/qmail-smtpd/x/conf/localiphost b/s6/qmail-smtpd/x/conf/localiphost diff --git a/s6/qmail-smtpd/x/conf/morercpthosts b/s6/qmail-smtpd/x/conf/morercpthosts diff --git a/s6/qmail-smtpd/x/conf/smtpgreeting b/s6/qmail-smtpd/x/conf/smtpgreeting