From 0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 27 May 2018 17:59:43 -0300 Subject: Adds lsd script --- lsd | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 lsd (limited to 'lsd') diff --git a/lsd b/lsd new file mode 100755 index 0000000..668fca3 --- /dev/null +++ b/lsd @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Lightweight Software Distribution (LSD) Management Script +# + +# Parameters +BASENAME="`basename $0`" +ACTION="$1" + +# List apps +function lsd_list { + #find -maxdepth 2 -iname 'readme*' -exec head -1 {} \; + find -maxdepth 2 -iname 'readme*' | while read readme; do + if [ "$readme" == "./README.md" ]; then + continue + fi + + echo -n "`dirname $readme | sed -e 's/^.\///'`: " + head -1 $readme + done +} + +# Dispatch +if [ -z "$ACTION" ] || [ "$ACTION" == "list" ]; then + lsd_list +fi -- cgit v1.2.3