From d1831029337813879bcd5f45fffb7789dd99456a Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 25 Jun 2012 14:17:42 +0000 Subject: [PATCH] - wrapper for TLD GIT/PLD CVS builder script --- builder.wrapper | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 builder.wrapper diff --git a/builder.wrapper b/builder.wrapper new file mode 100755 index 0000000..875a401 --- /dev/null +++ b/builder.wrapper @@ -0,0 +1,28 @@ +#!/bin/sh + +git_list="$HOME/rpm/packages/git-packages.txt" +git_list_url="http://kraz.tld-linux.org/git-packages.txt" + +/bin/rm "$git_list" 1>/dev/null 2>&1 +if /usr/bin/wget "$git_list_url" -O "$git_list" 1>/dev/null 2>&1; then + dl_md5=$(/usr/bin/head -n 1 "$git_list") + /bin/sed -i -e '1d' "$git_list" 1>/dev/null 2>&1 + list_md5="# MD5: $(/usr/bin/md5sum "$git_list" 2>/dev/null| cut -d " " -f 1)" + if [ "x$dl_md5" = "x$list_md5" ]; then + for p in "$@"; do + if echo "$p" | /bin/grep -q -E "\.spec$"; then + if /bin/grep -q -E "^"$p"$" $git_list; then + ~/rpm/packages/builder.git "$@" + else + ~/rpm/packages/builder.cvs "$@" + fi + fi + done + else + echo "Error: list of GIT package repositories is corrupted (MD5 mismatch)" + fi +else + /bin/rm "$git_list" 1>/dev/null 2>&1 + echo "Error: unable to fetch list of GIT package repositories" + exit 1 +fi -- 2.46.0