diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-05-27 17:59:43 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-05-27 17:59:43 -0300 |
commit | 0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236 (patch) | |
tree | 48734bc77ab4d988a9bfe00dcc3dd00b902a5d12 /lsd | |
parent | 2b9f7ee6c1a61207253fc7836315d9610b339f24 (diff) | |
download | apps-0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236.tar.gz apps-0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236.tar.bz2 |
Adds lsd script
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 |