aboutsummaryrefslogtreecommitdiff
path: root/lsd
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-27 17:59:43 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-27 17:59:43 -0300
commit0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236 (patch)
tree48734bc77ab4d988a9bfe00dcc3dd00b902a5d12 /lsd
parent2b9f7ee6c1a61207253fc7836315d9610b339f24 (diff)
downloadapps-0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236.tar.gz
apps-0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236.tar.bz2
Adds lsd script
Diffstat (limited to 'lsd')
-rwxr-xr-xlsd26
1 files changed, 26 insertions, 0 deletions
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