source: scripts/buildqueue.bash @ 2364

Revision 2325, 1.0 KB checked in by alanbach-guest, 6 years ago (diff)

Added remove package from queue comment

  • Property svn:executable set to *
Line 
1#!/bin/bash
2# Auto-Builder system queue to build packages in queue
3# Requires: autobuild.bash, wc
4# Coyright 2007 Alan Baghumian / GNU/GPL
5#
6# Created: 2007-10-21 14:43 +330 GMT
7# Updated: 2007-10-24 15:08 +330 GMT
8#
9# Note: Queue file format
10# srcpkgname-distname
11#
12# Example:
13# pango1.0 ramon
14# gconf2 ramon
15#
16# TODO:
17#
18
19QUEUE_PATH="/home/parsixftp/build-queue"
20AUTOBUILD_PATH="/root/autobuild.bash"
21
22# Define some colors first:
23GREEN="[1;32m"
24YELLOW="[1;33m"
25BLUE="[1;34m"
26MAGENTA="[1;35m"
27CYAN="[1;36m"
28WHITE="[1;37m"
29RED="[1;31m"
30NORMAL="[0;39m"
31
32if [ ! -f $AUTOBUILD_PATH ]; then
33    echo "${GREEN}Couldn't find autobuild.bash, exiting...${NORMAL}"
34    exit
35fi
36
37if [ ! -f $QUEUE_PATH ]; then
38    echo "${GREEN}Couldn't find queue file, exiting...${NORMAL}"
39    exit
40fi
41
42while read line
43do
44  echo "${GREEN}Building ${YELLOW}$line${GREEN}...${NORMAL}"
45  $AUTOBUILD_PATH $line
46  rm $QUEUE_PATH.tmp &> /dev/null
47
48  # Remove package from the queue
49  cat $QUEUE_PATH | grep -v "$line" > $QUEUE_PATH.tmp
50  mv $QUEUE_PATH.tmp $QUEUE_PATH
51done < $QUEUE_PATH
52
53
54
Note: See TracBrowser for help on using the repository browser.