Merge pull request #60343 from dtzWill/fix/luarocks-nix-formatting-and-awesome-doc-goodness

luarocks-nix,luaPackages: formatting and additions; awesome: docs!
This commit is contained in:
Will Dietz
2019-05-10 16:56:58 -05:00
committed by GitHub
6 changed files with 282 additions and 234 deletions
@@ -5,6 +5,7 @@ basexx,
dkjson
fifo
inspect
ldoc
lgi
lpeg_patterns
lpty
@@ -22,6 +23,7 @@ luaevent,
luacheck
luaffi,,http://luarocks.org/dev,
luuid,
markdown,
penlight,
rapidjson,
say,
1 # nix name, luarocks name, server, version/additionnal args
5 dkjson
6 fifo
7 inspect
8 ldoc
9 lgi
10 lpeg_patterns
11 lpty
23 luacheck
24 luaffi,,http://luarocks.org/dev,
25 luuid,
26 markdown,
27 penlight,
28 rapidjson,
29 say,
+10 -14
View File
@@ -76,11 +76,7 @@ FOOTER="
function convert_pkg () {
nix_pkg_name="$1"
lua_pkg_name="$2"
server=""
if [ ! -z "$3" ]; then
server=" --server=$3"
fi
server="${3:+--server=$3}"
version="${4:-}"
echo "looking at $lua_pkg_name (version $version) from server [$server]" >&2
@@ -101,15 +97,15 @@ echo "$HEADER" | tee "$TMP_FILE"
# name,server,version
while IFS=, read -r nix_pkg_name lua_pkg_name server version
do
if [ "${nix_pkg_name:0:1}" == "#" ]; then
echo "Skipping comment ${nix_pkg_name}" >&2
continue
fi
if [ -z "$lua_pkg_name" ]; then
echo "Using nix_name as lua_pkg_name" >&2
lua_pkg_name="$nix_pkg_name"
fi
convert_pkg "$nix_pkg_name" "$lua_pkg_name" "$server" "$version"
if [ "${nix_pkg_name:0:1}" == "#" ]; then
echo "Skipping comment ${nix_pkg_name}" >&2
continue
fi
if [ -z "$lua_pkg_name" ]; then
echo "Using nix_name as lua_pkg_name" >&2
lua_pkg_name="$nix_pkg_name"
fi
convert_pkg "$nix_pkg_name" "$lua_pkg_name" "$server" "$version"
done < "$CSV_FILE"
# close the set