[915] | 1 | #!/bin/ksh |
---|
| 2 | #------------------------------------------------------------------------------! |
---|
| 3 | # Current revisions: |
---|
| 4 | # ----------------- |
---|
| 5 | # |
---|
| 6 | # Former revisions: |
---|
| 7 | # ----------------- |
---|
| 8 | # $Id: release_tutorial 947 2012-07-17 16:03:17Z maronga $ |
---|
| 9 | # |
---|
[947] | 10 | # 946 2012-07-17 16:02:40Z maronga |
---|
| 11 | # Typo removed |
---|
| 12 | # |
---|
[916] | 13 | # 915 2012-05-30 15:11:11Z maronga |
---|
| 14 | # Initial revision |
---|
| 15 | # |
---|
[915] | 16 | # Description: |
---|
| 17 | # ------------ |
---|
| 18 | # Script for copying the compiled PDFs to a desired web directory. This script |
---|
| 19 | # should be used by user raasch only. |
---|
| 20 | # |
---|
| 21 | # Execution: |
---|
| 22 | # ---------- |
---|
| 23 | # release_tutorial --> Copy all PDF files to $release_directory (see below) |
---|
| 24 | #------------------------------------------------------------------------------! |
---|
| 25 | |
---|
[946] | 26 | release_directory="/home/raasch/public_html/files" |
---|
[915] | 27 | mod_dir_lecture="755" |
---|
| 28 | mod_dir_handout="755" |
---|
| 29 | mod_dir_web="755" |
---|
| 30 | mod_lecture="644" |
---|
| 31 | mod_handout="644" |
---|
| 32 | mod_web="644" |
---|
| 33 | |
---|
| 34 | full_name=`readlink -f $0` |
---|
| 35 | directory="$(dirname $full_name)/../TUTORIAL/SOURCE" |
---|
| 36 | input_dir="$(dirname $full_name)/../TUTORIAL" |
---|
| 37 | cd $input_dir |
---|
| 38 | |
---|
| 39 | printf "\n Files will be released in $release_directory/." |
---|
| 40 | printf "\n Subdirectories LECTURE, HANDOUT and WEB will be creared if necessary." |
---|
| 41 | printf "\n Start copying...\n" |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | if [[ ! -d $release_directory/LECTURE ]] then |
---|
| 45 | printf " $release_directory/LECTURE will be created.\n" |
---|
| 46 | mkdir -p $release_directory/LECTURE |
---|
| 47 | chmod $mod_dir_lecture $release_directory/LECTURE |
---|
| 48 | fi |
---|
| 49 | cp LECTURE/*.pdf "$release_directory/LECTURE/" |
---|
| 50 | chmod $mod_lecture $release_directory/LECTURE/* |
---|
| 51 | printf " Finished LECTURE.\n" |
---|
| 52 | |
---|
| 53 | if [[ ! -d $release_directory/HANDOUT ]] then |
---|
| 54 | printf " $release_directory/HANDOUT will be created.\n" |
---|
| 55 | mkdir -p $release_directory/HANDOUT |
---|
| 56 | chmod $mod_dir_handout $release_directory/HANDOUT |
---|
| 57 | |
---|
| 58 | fi |
---|
| 59 | cp HANDOUT/*.pdf "$release_directory/HANDOUT/" |
---|
| 60 | chmod $mod_handout $release_directory/HANDOUT/* |
---|
| 61 | printf " Finished HANDOUT.\n" |
---|
| 62 | |
---|
| 63 | if [[ ! -d $release_directory/WEB ]] then |
---|
| 64 | printf " $release_directory/WEB will be created.\n" |
---|
| 65 | mkdir -p $release_directory/WEB |
---|
| 66 | chmod $mod_dir_web $release_directory/WEB |
---|
| 67 | fi |
---|
| 68 | cp WEB/*.pdf "$release_directory/WEB/" |
---|
| 69 | chmod $mod_web $release_directory/WEB/* |
---|
| 70 | printf " Finished WEB.\n" |
---|
| 71 | |
---|
| 72 | printf " \n +++ All actions finished.\n" |
---|
| 73 | |
---|
| 74 | exit |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | |
---|