Contents of /trunk/mage-buildserver/queue-del.sh
Parent Directory | Revision Log
Revision 2862 -
(show annotations)
(download)
(as text)
Wed Feb 11 12:39:18 2015 UTC (9 years, 7 months ago) by niro
File MIME type: application/x-sh
File size: 673 byte(s)
Wed Feb 11 12:39:18 2015 UTC (9 years, 7 months ago) by niro
File MIME type: application/x-sh
File size: 673 byte(s)
-added a initial queue progression functionality
1 | #!/bin/bash |
2 | |
3 | die() { echo "error: $@"; exit 1; } |
4 | |
5 | # root or not? |
6 | [[ $(id -u) = 0 ]] || sudo="sudo" |
7 | |
8 | BUILDSERVER_CONFIG_DIR="/etc/mage-buildserver" |
9 | source ${BUILDSERVER_CONFIG_DIR}/buildserver.conf |
10 | |
11 | : ${SVN_HOME="/home/tjoke/svn/smage/trunk"} |
12 | |
13 | [[ -n $1 ]] || die "No param given" |
14 | |
15 | if [ ! -d ${QUEUEDIR} ] |
16 | then |
17 | die "'${QUEUEDIR} missing" |
18 | fi |
19 | |
20 | if [[ $1 = -n ]] |
21 | then |
22 | SMAGE="" |
23 | ID="$2" |
24 | queuefile="${QUEUEDIR}/${ID}" |
25 | msgtxt="id '${ID}'" |
26 | else |
27 | SMAGE="$1" |
28 | queuefile="$(grep -rl ${SMAGE} ${QUEUEDIR})" |
29 | msgtxt="smage '${SMAGE}'" |
30 | fi |
31 | |
32 | if [[ -n ${queuefile} ]] |
33 | then |
34 | if [ -e ${queuefile} ] |
35 | then |
36 | ${sudo} rm ${queuefile} |
37 | fi |
38 | else |
39 | echo "${msgtxt} not found in queue, ignoring" |
40 | fi |
Properties
Name | Value |
---|---|
svn:executable | * |