Ignore:
Timestamp:
Jul 20, 2012 9:54:04 AM (9 years ago)
Author:
maronga
Message:

modified release_tutorial script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/release_tutorial

    r947 r955  
    33# Current revisions:
    44# -----------------
    5 #
     5# The pdf files are now directly transfered to the trac system. A user account
     6# on the palm server is required. Without ssh-key, the passwort has to be given
     7# four times.
     8#
    69# Former revisions:
    710# -----------------
     
    2124# Execution:
    2225# ----------
    23 # release_tutorial --> Copy all PDF files to $release_directory (see below)
     26# release_tutorial --> Copy all PDF files to $release_directory on
     27# the trac server (see below)
    2428#------------------------------------------------------------------------------!
    2529
    26     release_directory="/home/raasch/public_html/files"
    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"
     30    release_directory="/palmdata/trac/htdocs/tutorial"
     31    server="palm"
     32    mod_lecture="664"
     33    mod_handout="664"
     34    mod_web="664"
    3335
    3436    full_name=`readlink -f $0`
     
    3840
    3941    printf "\n Files will be released in $release_directory/."
    40     printf "\n Subdirectories LECTURE, HANDOUT and WEB will be creared if necessary."
    4142    printf "\n Start copying...\n"
    4243
     44#   copy files to trac system
     45    scp LECTURE/*.pdf $USER@$server:"$release_directory/LECTURE/"
     46    scp HANDOUT/*.pdf $USER@$server:"$release_directory/HANDOUT/"
     47    scp WEB/*.pdf $USER@$server:"$release_directory/WEB/"
    4348
    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"
     49#   change permissions
     50    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/*"
    7151
    7252    printf " \n +++ All actions finished.\n"
Note: See TracChangeset for help on using the changeset viewer.