diff options
author | Eric Hameleers <alien@slackware.com> | 2013-01-05 22:35:19 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2013-01-05 22:35:19 +0000 |
commit | c7ff7aaad8efe75de197900bd8f99d0b01323695 (patch) | |
tree | fda5bf6fa2db1ab36477a3c527518b4705af6774 /libreoffice/build/gensrc_lo41.sh | |
parent | 75a1d226e4f7d0ddc1113fa62c92ae73377cf8da (diff) | |
download | asb-c7ff7aaad8efe75de197900bd8f99d0b01323695.tar.gz asb-c7ff7aaad8efe75de197900bd8f99d0b01323695.tar.xz |
Initial revision
Diffstat (limited to 'libreoffice/build/gensrc_lo41.sh')
-rwxr-xr-x | libreoffice/build/gensrc_lo41.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libreoffice/build/gensrc_lo41.sh b/libreoffice/build/gensrc_lo41.sh new file mode 100755 index 00000000..1ae9114e --- /dev/null +++ b/libreoffice/build/gensrc_lo41.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +PRGNAM=libreoffice +VERSION=4.0.0 +SUBVER=.0.beta2 + +STARTINDEX=7 + +III=$STARTINDEX + +# Two temp files to store download data: +TMP_DLLST=$(mktemp -t lo_XXXXXX) +TMP_FETCH=$(mktemp -t lo_XXXXXX) + +# Download necessary data files: +wget -q -O - "http://cgit.freedesktop.org/libreoffice/core/plain/download.lst?id=$(echo $PRGNAM-$VERSION$SUBVER)" > $TMP_DLLST +wget -q -O - "http://cgit.freedesktop.org/libreoffice/core/plain/Makefile.fetch?id=$(echo $PRGNAM-$VERSION$SUBVER)" > $TMP_FETCH + +# Get the names of the tarballs we need: +eval $( wget -q -O - "http://cgit.freedesktop.org/libreoffice/core/plain/configure.ac?id=$(echo $PRGNAM-$VERSION$SUBVER)" | grep UNOWINREG_DLL= ) +eval $( cat $TMP_DLLST | grep "^export " | grep -v MOZ_ZIP | sed -e 's/^export //' -e 's/ := /=/' ) + +# Find the download site for a given tarball: +find_url() { + cat $TMP_FETCH | sed -n "/$1/,/fetch_Download_item/s/^.*fetch_Download_item,\([^,]*\),.*$/\1/p" +} + +for BALL in UNOWINREG_DLL $( cat $TMP_DLLST | grep "^export " | grep -v MOZ_ZIP | sed -e 's/^export //' -e 's/ := .*$//' ); do + + SRCURL=$(find_url $BALL) + FILE=$(eval "echo \$$BALL") + + cat <<EOT +SOURCE[$III]="\$SRCDIR/sources/$FILE" +SRCURL[$III]="$SRCURL/$FILE" + +EOT + + III=$(($III+1)) + +done + +# Delete the temorary files: +rm -f $TMP_DLLST $TMP_FETCH + |