Changeset 138 for trunk/IPs/systemC/processor/Morpheo/Script/lock.sh
- Timestamp:
- May 12, 2010, 7:34:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Script/lock.sh
r85 r138 5 5 #----------------------------------------------------------- 6 6 7 #-----[ usage ]---------------------------------------------8 function usage ()7 #-----[ lock_usage ]---------------------------------------- 8 function lock_usage () 9 9 { 10 10 echo "Usage : ${0} file"; 11 echo "Arguments : ";12 echo ' * file : you can see the lock at "${MORPHEO_HOME}/lock/$(basename file).lock"';13 echo "Notes :";14 echo " * Morpheo's environnement must be positionned.";15 11 16 12 exit; … … 20 16 function lock () 21 17 { 18 if test ${#} -ne 1; then 19 lock_usage ${*}; 20 fi; 21 22 22 lockfile -1 ${1}; 23 23 } 24 24 25 #-----[ main ]----------------------------------------------26 function main ()27 {28 LOCK_DIRECTORY="${MORPHEO_HOME}/lock";29 30 if test ${#} -ne 1 -o -z ${MORPHEO_HOME} -o ! -d ${LOCK_DIRECTORY}; then31 usage ${*};32 fi;33 34 lock "${LOCK_DIRECTORY}/$(basename ${1}).lock"35 }36 37 25 #-----[ Corps ]--------------------------------------------- 38 main${*}26 lock ${*}
Note: See TracChangeset
for help on using the changeset viewer.