mirror of
https://github.com/nodiscc/awesome-linuxaudio.git
synced 2026-04-30 23:17:37 -05:00
29 lines
1.0 KiB
Bash
Executable File
29 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# Description: generate debian packages list, using moinmoin wiki markup for https://wiki.debian.org/Multimedia
|
|
# Requirements: bash sed grep cut. Debian Unstable sources list enabled (main contrib non-free sections).
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
function _getdescription() {
|
|
package="$1"
|
|
LANG=C apt-cache show "$package" | grep -E "^Description:" | cut -d" " -f1 --complement
|
|
}
|
|
|
|
moinmoin_markup=$(sed -n '/<!-- BEGIN SOFTWARE LIST -->/,/<!-- END SOFTWARE LIST -->/p' README.md | \
|
|
grep -E "#|◼|^$" | \
|
|
sed -e 's/#/=/g' | \
|
|
sed -e "s/\*\*/\'\'/g" | \
|
|
sed 's/^\(=*\)\(.*\)/\1\2 \1/' | \
|
|
sed 's|.*https://packages.debian.org/sid/\(.*\))).*|\1|g' | \
|
|
sed 's/^\([a-zA-Z]\)/ \* DebPkg:\1/')
|
|
|
|
echo "$moinmoin_markup" | while read line; do
|
|
if [[ "$line" =~ DebPkg ]]; then
|
|
package=${line#*:}
|
|
echo " * DebPkg:$package - $(_getdescription $package)"
|
|
else
|
|
echo "$line"
|
|
fi
|
|
done
|