dot

packages and services management
Log | Files | Refs | README

commit abcb06db6ffb36c8fc05cdad8b7222bde99f6aad
parent 01b78e099abd9fa1426409e0f2d355455a18cd35
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun,  8 Apr 2018 15:24:11 +0200

startsvdir to avoid typing the same thing over and again

Diffstat:
Abin/markup | 0
Abin/startsvdir | 5+++++
Mbin/xdg-abduco | 8+++++---
3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/bin/markup b/bin/markup diff --git a/bin/startsvdir b/bin/startsvdir @@ -0,0 +1,5 @@ +#!/bin/sh -e + +pad=............................................................................ + +pgrep -f "runsvdir -P $SVDIR" || runsvdir -P "$SVDIR" "$pad$pad$pad" diff --git a/bin/xdg-abduco b/bin/xdg-abduco @@ -14,9 +14,11 @@ grep -e "^$(abduco | sed -rn 's/.* ([0-9]+)$/\1/p') " "$dir/names" | sort -k2 -uo "$dir/names" # get the real path name -[ ! -h "$2" ] || name="$(readlink -f "$2")" -[ ! -e "$2" ] || name="$(cd "$(dirname "$2")"; pwd)/$(basename "$2")" -[ ! -d "$2" ] || name="$(cd "$2"; pwd)" +[ ! -h "$2" ] || set -- "$1" "$(readlink -f "$2")" +[ ! -e "$2" ] || set -- "$1" "$(cd "$(dirname "$2")"; pwd)/$(basename "$2")" +[ ! -d "$2" ] || set -- "$1" "$(cd "$2"; pwd)" + +printf '\033]0;%s\a' "$2" 1>&2 case "$#" in (0)