[1841] | 1 | #!/bin/bash |
---|
[1046] | 2 | #--------------------------------------------------------------------------------# |
---|
[2696] | 3 | # This file is part of the PALM model system. |
---|
[1046] | 4 | # |
---|
| 5 | # PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 6 | # of the GNU General Public License as published by the Free Software Foundation, |
---|
| 7 | # either version 3 of the License, or (at your option) any later version. |
---|
| 8 | # |
---|
| 9 | # PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 10 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 11 | # A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 12 | # |
---|
| 13 | # You should have received a copy of the GNU General Public License along with |
---|
| 14 | # PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 15 | # |
---|
[4843] | 16 | # Copyright 1997-2021 Leibniz Universitaet Hannover |
---|
[1046] | 17 | #--------------------------------------------------------------------------------# |
---|
| 18 | # |
---|
[915] | 19 | # Current revisions: |
---|
[1841] | 20 | # ------------------ |
---|
[1842] | 21 | # |
---|
| 22 | # |
---|
[915] | 23 | # Former revisions: |
---|
| 24 | # ----------------- |
---|
| 25 | # $Id: release_tutorial 4843 2021-01-15 15:22:11Z schwenkel $ |
---|
[2716] | 26 | # Corrected "Former revisions" section |
---|
| 27 | # |
---|
| 28 | # 2696 2017-12-14 17:12:51Z kanani |
---|
| 29 | # Change in file header (GPL part) |
---|
[915] | 30 | # |
---|
[1842] | 31 | # 1841 2016-04-07 19:14:06Z raasch |
---|
| 32 | # script now running under bash |
---|
| 33 | # |
---|
[1047] | 34 | # 1046 2012-11-09 14:38:45Z maronga |
---|
| 35 | # code put under GPL (PALM 3.9) |
---|
| 36 | # |
---|
[982] | 37 | # 981 2012-08-09 14:57:44Z maronga |
---|
| 38 | # Typo removed |
---|
| 39 | # |
---|
[956] | 40 | # 955 2012-07-20 09:54:04Z maronga |
---|
| 41 | # The pdf files are now directly transfered to the trac system. A user account |
---|
| 42 | # on the palm server is required. Without ssh-key, the passwort has to be given |
---|
| 43 | # four times. |
---|
| 44 | # |
---|
[947] | 45 | # 946 2012-07-17 16:02:40Z maronga |
---|
| 46 | # Typo removed |
---|
| 47 | # |
---|
[916] | 48 | # 915 2012-05-30 15:11:11Z maronga |
---|
| 49 | # Initial revision |
---|
| 50 | # |
---|
[915] | 51 | # Description: |
---|
| 52 | # ------------ |
---|
| 53 | # Script for copying the compiled PDFs to a desired web directory. This script |
---|
| 54 | # should be used by user raasch only. |
---|
| 55 | # |
---|
| 56 | # Execution: |
---|
| 57 | # ---------- |
---|
[955] | 58 | # release_tutorial --> Copy all PDF files to $release_directory on |
---|
| 59 | # the trac server (see below) |
---|
[915] | 60 | #------------------------------------------------------------------------------! |
---|
| 61 | |
---|
[955] | 62 | release_directory="/palmdata/trac/htdocs/tutorial" |
---|
| 63 | server="palm" |
---|
| 64 | mod_lecture="664" |
---|
| 65 | mod_handout="664" |
---|
| 66 | mod_web="664" |
---|
[915] | 67 | |
---|
| 68 | full_name=`readlink -f $0` |
---|
| 69 | directory="$(dirname $full_name)/../TUTORIAL/SOURCE" |
---|
| 70 | input_dir="$(dirname $full_name)/../TUTORIAL" |
---|
| 71 | cd $input_dir |
---|
| 72 | |
---|
| 73 | printf "\n Files will be released in $release_directory/." |
---|
| 74 | printf "\n Start copying...\n" |
---|
| 75 | |
---|
[955] | 76 | # copy files to trac system |
---|
| 77 | scp LECTURE/*.pdf $USER@$server:"$release_directory/LECTURE/" |
---|
| 78 | scp HANDOUT/*.pdf $USER@$server:"$release_directory/HANDOUT/" |
---|
| 79 | scp WEB/*.pdf $USER@$server:"$release_directory/WEB/" |
---|
[915] | 80 | |
---|
[955] | 81 | # change permissions |
---|
| 82 | ssh $server -l $USER "cd $release_directory/LECTURE; chmod $mod_lecture $release_directory/LECTURE/*; chmod $mod_handout $release_directory/HANDOUT/*; chmod $mod_web $release_directory/WEB/*" |
---|
[915] | 83 | |
---|
[981] | 84 | printf " \n *** All actions finished.\n" |
---|
[915] | 85 | |
---|
| 86 | exit |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | |
---|