Changeset 1563 for branches/locker-dev/locker/bin
- Timestamp:
- May 24, 2010, 10:35:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/locker-dev/locker/bin/cronload
r463 r1563 1 1 #!/bin/sh 2 3 usage="Usage \"$0 [-l lockername] crontab\"" 4 while getopts "l:h" options; do 5 case $options in 6 l ) lname=$OPTARG;; 7 h ) echo "$usage"; exit 0;; 8 \? ) echo "$usage" 9 exit 1;; 10 * ) echo "$usage" 11 exit 1;; 12 esac 13 done 14 shift `expr $OPTIND - 1` 15 if [ -z "$1" ]; then 16 echo "$usage" 17 exit 1 18 fi 2 19 3 20 echo "This program should print your new crontab below." … … 6 23 echo 7 24 25 8 26 cwd=`pwd` 9 lname=`perl -e "\\\$temp = \"$cwd\"; \\\$temp =~ /\\\/([^\\\/]+)\\\/cron_scripts/; print \\\$1"` 27 if [ -z "$lname" ]; then 28 lname=`perl -e "\\\$temp = \"$cwd\"; \\\$temp =~ /\\\/([^\\\/]+)\\\/cron_scripts/; print \\\$1"` 29 fi 30 if [ -z "$lname" ]; then 31 echo "ERROR: Could not detect locker name. Make sure to run" 32 echo "cronload from within /mit/lockername/cron_scripts/" 33 echo "(or pass the -l lockername option)" 34 exit 1 35 fi 10 36 athrun scripts scripts-ssh "$lname" /usr/local/bin/cronload "$1" "$cwd" 2>/dev/null
Note: See TracChangeset
for help on using the changeset viewer.