OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [tools/] [build/] [unlock-directory.in] - Blame information for rev 757

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#!@KSH@
2
#
3
# $Id: unlock-directory.in,v 1.2 2001-09-27 12:02:53 chris Exp $
4
#
5
# Unlock a directory processed by lock_directory
6
#
7
 
8
# is a particular command available on this machine?
9
#
10
cmd_avail()
11
{
12
    set -- `type $1 2>&1`
13
    if [ "$2" = "not" -a "$3" = "found" ] || [ "$3" = "not" -a "$4" = "found" ]
14
    then
15
        return 1
16
    else
17
        return 0
18
    fi
19
}
20
 
21
unlock_directory() {
22
    ul_dir=$1/.                 # get any symlink out of the way using '.'
23
    if [ -d $ul_dir ]
24
    then
25
        find $ul_dir -type d ! -perm -0222 -print | $XARGS -t chmod +w
26
    fi
27
}
28
 
29
# Use gnu xargs if available; faster, more reliable in general
30
XARGS=xargs
31
cmd_avail gxargs && XARGS=gxargs
32
 
33
for dir
34
do
35
    unlock_directory $dir
36
done
37
 
38
# Local Variables: ***
39
# mode:ksh ***
40
# End: ***
41
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.