Magellan Linux

Annotation of /trunk/mage-buildserver/queue-prune.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2865 - (hide annotations) (download) (as text)
Sat Feb 14 11:48:33 2015 UTC (9 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 286 byte(s)
-make use of sudo variable
1 niro 2862 #!/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 niro 2865 ${sudo} rm -r ${QUEUEDIR}

Properties

Name Value
svn:executable *