diff options
author | EuAndreh <eu@euandre.org> | 2024-05-09 14:47:17 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-05-09 14:47:17 -0300 |
commit | 806ad08d215f3599adc5f9d41ac0e300b9d53c59 (patch) | |
tree | 645620804118307c8e646758b7265cd8e1c4c6ee /bin | |
parent | bin/backup: Update help string (diff) | |
download | dotfiles-806ad08d215f3599adc5f9d41ac0e300b9d53c59.tar.gz dotfiles-806ad08d215f3599adc5f9d41ac0e300b9d53c59.tar.xz |
bin/statusconv: Move to eut
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/statusconv | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/bin/statusconv b/bin/statusconv deleted file mode 100755 index 9bc858b..0000000 --- a/bin/statusconv +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -set -eu - - -FROM_N='' -TO_N='' -for flag in "$@"; do - case "$flag" in - *[0-9]:*[0-9]) - X="$(printf '%s' "$flag" | cut -d ':' -f1)" - Y="$(printf '%s' "$flag" | cut -d ':' -f2)" - FROM_N="$FROM_N $X" - TO_N="$TO_N $Y" - shift - ;; - *) - break - ;; - esac -done - - -if [ "$1" = '--' ]; then - shift -fi - -STATUS=0 -"$@" || STATUS=$? - -FOUND=false -I=-1 -for from in $FROM_N; do - I=$((I + 1)) - if [ "$from" = "$STATUS" ]; then - FOUND=true - break - fi -done - -if [ "$FOUND" = false ]; then - exit "$STATUS" -fi - -J=-1 -for to in $TO_N; do - J=$((J + 1)) - if [ "$J" = "$I" ]; then - exit "$to" - fi -done |