2016-01-01 12:29:21 +03:00
|
|
|
#!/run/current-system/sw/bin/bash
|
|
|
|
|
2016-01-21 19:16:28 +03:00
|
|
|
# Ideally we would move as much as possible into derivation dependencies
|
|
|
|
|
2016-01-01 12:29:21 +03:00
|
|
|
# Take the list of files from the main package, ooo.lst.in
|
|
|
|
|
2016-01-21 19:16:28 +03:00
|
|
|
# This script wants an argument: download list file
|
|
|
|
|
2016-01-01 12:29:21 +03:00
|
|
|
cat <<EOF
|
|
|
|
[
|
|
|
|
EOF
|
|
|
|
|
|
|
|
write_entry(){
|
|
|
|
echo '{'
|
|
|
|
echo " name = \"${name}\";"
|
|
|
|
echo " md5 = \"${md5}\";"
|
|
|
|
echo " brief = ${brief};"
|
2016-01-21 19:16:28 +03:00
|
|
|
eval "echo -n \"\$additions_${name%%[-_.]*}\""
|
|
|
|
eval "test -n \"\$additions_${name%%[-_.]*}\" && echo"
|
2016-01-01 12:29:21 +03:00
|
|
|
echo '}'
|
|
|
|
}
|
|
|
|
|
2016-01-21 19:16:28 +03:00
|
|
|
cat "$(dirname "$0")/libreoffice-srcs-additions.sh" "$@" |
|
2016-01-01 12:29:21 +03:00
|
|
|
while read line; do
|
|
|
|
case "$line" in
|
2016-01-21 19:16:28 +03:00
|
|
|
EVAL\ *)
|
|
|
|
echo "${line#* }" >&2;
|
|
|
|
eval "${line#* }";
|
|
|
|
;;
|
2016-01-01 12:29:21 +03:00
|
|
|
\#*)
|
|
|
|
echo Skipping comment: "$line" >&2;
|
|
|
|
;;
|
|
|
|
*_MD5SUM\ :=*)
|
|
|
|
read tbline;
|
|
|
|
line=${line##* };
|
|
|
|
if [ "${tbline#*VERSION_MICRO}" != "$tbline" ]; then
|
|
|
|
verline=${tbline##* };
|
|
|
|
read tbline;
|
|
|
|
tbline=${tbline##* };
|
|
|
|
md5=$line
|
|
|
|
name=$tbline;
|
|
|
|
name="${name/\$([A-Z]*_VERSION_MICRO)/$verline}"
|
|
|
|
else
|
|
|
|
tbline=${tbline##* };
|
|
|
|
md5=$line
|
|
|
|
name=$tbline;
|
|
|
|
fi
|
|
|
|
brief=true;
|
|
|
|
write_entry;
|
|
|
|
;;
|
|
|
|
*_TARBALL\ :=*)
|
|
|
|
line=${line##* };
|
|
|
|
line="${line#,}"
|
|
|
|
md5=${line:0:32};
|
|
|
|
name=${line:33};
|
2016-01-21 19:16:28 +03:00
|
|
|
name="${name%)}"
|
2016-01-01 12:29:21 +03:00
|
|
|
brief=false;
|
|
|
|
write_entry;
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo Skipping: "$line" >&2;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
echo ']'
|