blob: 668fca34de4cdf313815a9023911f893cb0b67da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
|