| Last change
                  on this file since 1565 was
                  1564,
                  checked in by adehnert, 15 years ago | 
        
          | Some minor cronload cleanup | 
        
          | 
              
                  Property svn:executable set to
                  * | 
        | File size:
            916 bytes | 
      
      
        
  | Line |  | 
|---|
| 1 | #!/bin/sh | 
|---|
| 2 |  | 
|---|
| 3 | usage="Usage \"$0 [-l lockername] [-h] 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"; exit 1;; | 
|---|
| 9 | esac | 
|---|
| 10 | done | 
|---|
| 11 | shift `expr $OPTIND - 1` | 
|---|
| 12 | if [ -z "$1" ]; then | 
|---|
| 13 | echo "$usage" | 
|---|
| 14 | exit 1 | 
|---|
| 15 | fi | 
|---|
| 16 |  | 
|---|
| 17 | echo "This program should print your new crontab below." | 
|---|
| 18 | echo "If it does not do so, something is wrong." | 
|---|
| 19 | echo "Feel free to contact scripts@mit.edu for assistance." | 
|---|
| 20 | echo | 
|---|
| 21 |  | 
|---|
| 22 |  | 
|---|
| 23 | cwd=`pwd` | 
|---|
| 24 | if [ -z "$lname" ]; then | 
|---|
| 25 | lname=`perl -e "\\\$temp = \"$cwd\"; \\\$temp =~ /\\\/([^\\\/]+)\\\/cron_scripts/; print \\\$1"` | 
|---|
| 26 | fi | 
|---|
| 27 | if [ -z "$lname" ]; then | 
|---|
| 28 | echo "ERROR: Could not detect locker name. Make sure to run" | 
|---|
| 29 | echo "cronload from within /mit/lockername/cron_scripts/" | 
|---|
| 30 | echo "(or pass the -l lockername option)" | 
|---|
| 31 | exit 1 | 
|---|
| 32 | fi | 
|---|
| 33 | athrun scripts scripts-ssh "$lname" /usr/local/bin/cronload "$1" "$cwd" 2>/dev/null | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.