Last change
on this file since 82 was
82,
checked in by rosiere, 16 years ago
|
- support locale (now must "just" translate)
- update all component with new test format
- update all component with usage
- New component : decod queue and prediction_unit
|
-
Property svn:keywords set to
Id
|
File size:
922 bytes
|
Rev | Line | |
---|
[2] | 1 | #!/bin/sh |
---|
[82] | 2 | #----------------------------------------------------------- |
---|
| 3 | # $Id: lock.sh 82 2008-05-01 16:48:45Z rosiere $ |
---|
| 4 | #----------------------------------------------------------- |
---|
[2] | 5 | |
---|
| 6 | #-----[ usage ]--------------------------------------------- |
---|
| 7 | function usage () |
---|
| 8 | { |
---|
[78] | 9 | echo "Usage : ${0} file"; |
---|
| 10 | echo "Arguments : "; |
---|
| 11 | echo ' * file : you can see the lock at "${MORPHEO_HOME}/lock/$(basename file).lock"'; |
---|
| 12 | echo "Notes :"; |
---|
| 13 | echo " * Morpheo's environnement must be positionned."; |
---|
| 14 | |
---|
[2] | 15 | exit; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | #-----[ lock ]---------------------------------------------- |
---|
| 19 | function lock () |
---|
| 20 | { |
---|
| 21 | lockfile -1 ${1}; |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | #-----[ main ]---------------------------------------------- |
---|
| 25 | function main () |
---|
| 26 | { |
---|
[78] | 27 | LOCK_DIRECTORY="${MORPHEO_HOME}/lock"; |
---|
| 28 | |
---|
| 29 | if test ${#} -ne 1 -o -z ${MORPHEO_HOME} -o ! -d ${LOCK_DIRECTORY}; then |
---|
[2] | 30 | usage ${*}; |
---|
| 31 | fi; |
---|
| 32 | |
---|
[78] | 33 | lock "${LOCK_DIRECTORY}/$(basename ${1}).lock" |
---|
[2] | 34 | } |
---|
| 35 | |
---|
| 36 | #-----[ Corps ]--------------------------------------------- |
---|
| 37 | main ${*} |
---|
Note: See
TracBrowser
for help on using the repository browser.