File: check.lock

package info (click to toggle)
pact 980714-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 13,096 kB
  • ctags: 26,034
  • sloc: ansic: 109,076; lisp: 9,645; csh: 7,147; fortran: 1,050; makefile: 136; lex: 95; sh: 32
file content (49 lines) | stat: -rwxr-xr-x 815 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/csh -f
#>
#> CHECK.LOCK - check if repository is locked
#>
####################
# include "cpyright.h"
#

# see PCD for the reason for this
set Here = `pwd` ; cd ; set RealHome = `pwd` ; cd $Here ; unset $Here


set UserDir       = `pwd | sed "s|$RealHome|$home|"`
set SCSRepository = ""
set SRCDate       = ""
set LockOn        = "NO"


# define the Source Control System
source $UserDir/pact-scs

#
# check if repository is locked
#
if (-e $SCSLock) then
   echo ""
   echo " *** REPOSITORY IS LOCKED ***"
   echo ""
   cat $SCSLock
   echo ""
   set LockOn = "YES"
endif

if ($LockOn == "NO") then
   set nstatus = 0
else
   echo -n "Sleeping ZZZZZ"
Loop:
   if (-e $SCSLock) then
      echo -n "Z"
      sleep 30
      goto Loop
   else
      echo ""
      set nstatus = 0
   endif
endif

exit($nstatus)