dot

packages and services management
Log | Files | Refs | README

commit d236d4039efb9265619909a58a974daf5cd42614
parent 00241e31295db344a0a94bbad4b6ef753fef36eb
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 20 Jan 2019 23:07:09 +0100

update git hooks

Diffstat:
Mbin/open | 12+++++-------
Abin/s6-mk | 3+++
Abin/tls-pincert | 8++++++++
Mconf/git | 28++++++++++++++--------------
Mconf/pack | 9+++++----
Detc/git/pack/hooks/post-receive.d/pack | 11-----------
Aetc/git/recipes/hooks/post-receive.d/recipes | 13+++++++++++++
Aetc/git/release/hooks/post-receive.d/release | 14++++++++++++++
Mhome/.xinitrc | 2--
Dprofile/pack.sh | 3---
10 files changed, 62 insertions(+), 41 deletions(-)

diff --git a/bin/open b/bin/open @@ -3,6 +3,7 @@ elgetpositionals -P 1 backtick -n x { whoami } importas USER x backtick -n x { homeof $USER } importas HOME x importas -D ${HOME}/.config/open OPEN OPEN +importas -D vi EDITOR EDITOR redirfd -r 0 /dev/tty redirfd -w 1 /dev/tty @@ -14,16 +15,13 @@ 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 ${protocol} } test -e ${OPEN}/protocol/${protocol} } +ifelse { if { test ${protocol} } test -e ${OPEN}/protocol/${protocol} } { ${OPEN}/protocol/${protocol} $1 $uri } -ifelse { if { test ${extension} } test -e ${OPEN}/extension/${extension} } +ifelse { if { test ${extension} } test -e ${OPEN}/extension/${extension} } { ${OPEN}/extension/${extension} $1 } -ifelse { if { test -d $1 } test -e file } - { file $1 } - -ifelse { if { test -f $1 } test -e file } - { file $1 } +ifelse { if { test -f $1 } test -e file } + { ${EDITOR} $1 } foreground { echo no handler found for $1 } exit 2 diff --git a/bin/s6-mk b/bin/s6-mk @@ -0,0 +1,3 @@ +#!/usr/bin/env execlineb + +ii ii-freenode ircs://josuah@irc.freenode.net:6697 diff --git a/bin/tls-pincert b/bin/tls-pincert @@ -0,0 +1,8 @@ +#!/usr/bin/env execlineb +elgetpositionals + +if -nt { test -e /etc/tls/public/${1}.pem } +if { mkdir -p /etc/tls/public } +redirfd -r 0 /dev/null +redirfd -w 1 /etc/tls/public/${1}.pem +openssl s_client -showcerts -connect "${1}:${2}" diff --git a/conf/git b/conf/git @@ -1,16 +1,16 @@ #!/usr/bin/env execlineb -if { git-newrepo public dot "packages and services management" } -if { git-newrepo public eel "formatter for ii(1) logs" } -if { git-newrepo public ff2txt "display a farbfeld(5) image as text" } -if { git-newrepo public ics2txt "awk tool for converting ical to a text" } -if { git-newrepo public iomenu "interactive text selection menu" } -if { git-newrepo public miniwi "tiny 4x8 bitmapped font" } -if { git-newrepo public ploot "plot images or text from a .csv file" } -if { git-newrepo public plstree "display ls or ps output as a tree" } -if { git-newrepo public tttml "formatter for a very basic markup format" } -if { git-newrepo public sites "mirror of git://git.suckless.org/sites" } -if { git-newrepo public pack "[WIP] dead simple source-based package manager" } -if { git-newrepo public s6-mk "services definition for the s6-rc service manager" } -if { git-newrepo public,pack packages "packages recipes for the <noname> package manager" } -if { git-newrepo blog blog "blog posts" } +if { git-newrepo public dot "packages and services management" } +if { git-newrepo public eel "formatter for ii(1) logs" } +if { git-newrepo public ff2txt "display a farbfeld(5) image as text" } +if { git-newrepo public ics2txt "awk tool for converting ical to a text" } +if { git-newrepo public iomenu "interactive text selection menu" } +if { git-newrepo public miniwi "tiny 4x8 bitmapped font" } +if { git-newrepo public ploot "plot images or text from a .csv file" } +if { git-newrepo public plstree "display ls or ps output as a tree" } +if { git-newrepo public tttml "formatter for a very basic markup format" } +if { git-newrepo public sites "mirror of git://git.suckless.org/sites" } +if { git-newrepo public s6-mk "services definition for the s6-rc service manager" } +if { git-newrepo public,recipes recipes "packages recipes for the <noname> package manager" } +if { git-newrepo public,release package "simple and robust package manager" } +if { git-newrepo blog blog "blog posts" } diff --git a/conf/pack b/conf/pack @@ -1,7 +1,8 @@ #!/bin/sh -ex -mkdir -p /var/pack/src/pack -[ -d /var/pack/src/pack/git ] || git clone git://git.josuah.net/pack /var/pack/src/pack/git -cd /var/pack/src/pack/git +cd "$(mktemp -d)" +trap 'rm -rf "$PWD"' INT EXIT TERM +wget -O- https://josuah.h-o.st.net/release/tack.tar | tar -xf - +cd * -make PREFIX=/var/pack install +make install diff --git a/etc/git/pack/hooks/post-receive.d/pack b/etc/git/pack/hooks/post-receive.d/pack @@ -1,11 +0,0 @@ -#!/usr/bin/env execlineb -elgetpositionals - -if { - pipeline { git archive --format=tar } - tar -xf - -C /var/www/josuah.net/pack } -} - -cd /var/www/josuah.net/pack -redirfd -w 1 index.html -ltree-html diff --git a/etc/git/recipes/hooks/post-receive.d/recipes b/etc/git/recipes/hooks/post-receive.d/recipes @@ -0,0 +1,13 @@ +#!/usr/bin/env execlineb +elgetpositionals + +if { rm -rf /var/www/josuah.h-o.st/recipes } +if { + pipeline { git archive --format=tar } + tar -xf - -C /var/www/josuah.h-o.st/recipes +} + +if { mkdir -p /var/www/josuah.h-o.st/recipes } +cd /var/www/josuah.h-o.st/recipes +redirfd -w 1 index.html +ltree-html diff --git a/etc/git/release/hooks/post-receive.d/release b/etc/git/release/hooks/post-receive.d/release @@ -0,0 +1,14 @@ +#!/usr/bin/env execlineb + +backtick -n x { pipeline { git rev-parse --show-toplevel } xargs basename } +importas name x + +define domain tar.h-o.st + +if { mkdir -p /var/www/${domain}/${name} } + +forbacktickx -n x { git tag } +importas tag x + +redirfd -w 1 /var/www/${domain}/${name}-${tag}.tar +git archive --prefix=${name}-${tag} --format=tar ${tag} diff --git a/home/.xinitrc b/home/.xinitrc @@ -1,6 +1,4 @@ #!/bin/sh -e setxkbmap us -option compose:ralt -st & -xterm & exec dwm diff --git a/profile/pack.sh b/profile/pack.sh @@ -1,3 +0,0 @@ -export PACK=/var/pack -export MANPATH=$PACK/man:$MANPATH -export PATH=$PACK/bin:$PATH