diff options
Diffstat (limited to 'lsd')
-rwxr-xr-x | lsd | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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 |