From 8b9a649ac05469881e17a63112cef69bdc19ed08 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 4 Jan 2022 15:41:32 -0300 Subject: scripts/: Move executables to src/bin/, and add a proper CLI interface to them --- src/bin/fim | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 src/bin/fim (limited to 'src/bin/fim') diff --git a/src/bin/fim b/src/bin/fim new file mode 100755 index 00000000..7a21a513 --- /dev/null +++ b/src/bin/fim @@ -0,0 +1,50 @@ +#!/bin/sh +set -eu + +usage() { + cat <<-'EOF' + Usage: + fim + fim -h +EOF +} + +help() { + cat <<-'EOF' + + Options: + -h, --help show this message +EOF +} + +for flag in "$@"; do + case "$flag" in + --) + break + ;; + --help) + usage + help + exit + ;; + *) + ;; + esac +done + +while getopts 'h' flag; do + case "$flag" in + h) + usage + help + exit + ;; + *) + usage >&2 + exit 2 + ;; + esac +done +shift $((OPTIND - 1)) + +play "$DOTFILES/sh/Positive.ogg" 2> /dev/null -- cgit v1.3