dot

packages and services management
Log | Files | Refs | README

commit e4d8a39494b8f151c7feda24e78abbb4ff9fc73b
parent 4998d44df82effc681a8aac9320c6372d33d93ae
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 27 Nov 2018 22:42:39 +0100

dot/config/open/*: fix execline syntax

Diffstat:
Mbin/o | 5+++--
Mbin/open | 9++++-----
Mbin/pack-add | 1-
Mbin/pack-install | 2+-
Mbin/xdg-open | 5+++--
Mdot/config/open/extension/7z | 3++-
Mdot/config/open/extension/gz | 4++--
Mdot/config/open/extension/lz | 4++--
Mdot/config/open/extension/tbz | 7+++++--
Mdot/config/open/extension/tgz | 7+++++--
Mdot/config/open/extension/tlz | 7+++++--
Mdot/config/open/extension/txz | 7+++++--
Mdot/config/open/extension/xz | 4++--
Dpack/wireguard/0.0.20180524/tar | 1-
14 files changed, 39 insertions(+), 27 deletions(-)

diff --git a/bin/o b/bin/o @@ -1,2 +1,3 @@ -#!/bin/sh -ex -exec open "$@" +#!/usr/bin/env execlineb +elgetpositionals +open $@ diff --git a/bin/open b/bin/open @@ -4,7 +4,6 @@ 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 @@ -15,11 +14,11 @@ 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 protocol/$protocol } - { protocol/$protocol $1 $uri } +ifelse { if { test ${protocol} } test -e ${OPEN}/protocol/${protocol} } + { ${OPEN}/protocol/${protocol} $1 $uri } -ifelse { if { test $extension } test -e extension/$extension } - { extension/$extension $1 } +ifelse { if { test ${extension} } test -e ${OPEN}/extension/${extension} } + { ${OPEN}/extension/${extension} $1 } ifelse { if { test -d $1 } test -e file } { file $1 } diff --git a/bin/pack-add b/bin/pack-add @@ -4,5 +4,4 @@ test $# -gt 0 pack-dep "$@" | while read -r pack version; do printf ' %-30s %-15s' "$pack" "$version" pack-install "$pack" "$version" - printf '\n' done diff --git a/bin/pack-install b/bin/pack-install @@ -3,7 +3,7 @@ PACK=${PACK:-/var/pack} pack=$1 version=${2:-$(sed q "/etc/pack/$1/version")} pack-build "$pack" "$version" || { echo; exit 1; } -printf ' install' +echo ' install' mkdir -p "$PACK/log/$pack/$version" exec >$PACK/log/$pack/$version/install 2>&1 diff --git a/bin/xdg-open b/bin/xdg-open @@ -1,2 +1,3 @@ -#!/bin/sh -ex -exec open "$@" +#!/usr/bin/env execlineb +elgetpositionals +open $@ diff --git a/dot/config/open/extension/7z b/dot/config/open/extension/7z @@ -1,2 +1,3 @@ #!/usr/bin/env execlineb -elgetpositionals 7z x $1 +elgetpositionals +7z x $1 diff --git a/dot/config/open/extension/gz b/dot/config/open/extension/gz @@ -1,3 +1,3 @@ #!/usr/bin/env execlineb -elgetpositionals backtick f { pipeline { echo $1 } sed "s/.gz$//" } -importas f f if { mv $1 $f } open $f +elgetpositionals +gzip -d $1 diff --git a/dot/config/open/extension/lz b/dot/config/open/extension/lz @@ -1,3 +1,3 @@ #!/usr/bin/env execlineb -elgetpositionals backtick f { pipeline { echo $1 } sed "s/.lz$//" } -importas f f if { mv $1 $f } open $f +elgetpositionals +lzip -d $1 diff --git a/dot/config/open/extension/tbz b/dot/config/open/extension/tbz @@ -1,3 +1,6 @@ #!/usr/bin/env execlineb -elgetpositionals backtick f { pipeline { echo $1 } sed "s/.tbz$/.tar.bz2/" } -importas f f if { mv $1 $f } open $f +elgetpositionals +backtick -n x { heredoc 0 $1 sed "s/.tbz$/.tar.bz2/" } +importas file x +if { mv $1 $file } +open $file diff --git a/dot/config/open/extension/tgz b/dot/config/open/extension/tgz @@ -1,3 +1,6 @@ #!/usr/bin/env execlineb -elgetpositionals backtick f { pipeline { echo $1 } sed "s/.tgz$/.tar.gz/" } -importas f f if { mv $1 $f } open $f +elgetpositionals +backtick -n x { heredoc 0 $1 sed "s/.tgz$/.tar.gz2/" } +importas file x +if { mv $1 $file } +open $file diff --git a/dot/config/open/extension/tlz b/dot/config/open/extension/tlz @@ -1,3 +1,6 @@ #!/usr/bin/env execlineb -elgetpositionals backtick f { pipeline { echo $1 } sed "s/.tlz$/.tar.lz/" } -importas f f if { mv $1 $f } open $f +elgetpositionals +backtick -n x { heredoc 0 $1 sed "s/.tlz$/.tar.lz/" } +importas file x +if { mv $1 $file } +open $file diff --git a/dot/config/open/extension/txz b/dot/config/open/extension/txz @@ -1,3 +1,6 @@ #!/usr/bin/env execlineb -elgetpositionals backtick f { pipeline { echo $1 } sed "s/.txz$/.tar.xz/" } -importas f f if { mv $1 $f } open $f +elgetpositionals +backtick -n x { heredoc 0 $1 sed "s/.txz$/.tar.xz/" } +importas file x +if { mv $1 $file } +open $file diff --git a/dot/config/open/extension/xz b/dot/config/open/extension/xz @@ -1,3 +1,3 @@ #!/usr/bin/env execlineb -elgetpositionals backtick f { pipeline { echo $1 } sed "s/.xz$//" } -importas f f if { mv $1 $f } open $f +elgetpositionals +xz -d $1 diff --git a/pack/wireguard/0.0.20180524/tar b/pack/wireguard/0.0.20180524/tar @@ -1 +0,0 @@ -https://git.zx2c4.com/WireGuard/snapshot/WireGuard-%s.tar.xz