Contents of /trunk/mage-buildserver/queue-prune.sh
Parent Directory | Revision Log
Revision 2865 -
(show annotations)
(download)
(as text)
Sat Feb 14 11:48:33 2015 UTC (9 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 286 byte(s)
Sat Feb 14 11:48:33 2015 UTC (9 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 286 byte(s)
-make use of sudo variable
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 | if [ ! -d ${QUEUEDIR} ]] |
12 | then |
13 | die "'${QUEUEDIR} missing" |
14 | fi |
15 | |
16 | ${sudo} rm -r ${QUEUEDIR} |
Properties
Name | Value |
---|---|
svn:executable | * |