Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6560 dpurdie 1
#! /bin/bash
2
########################################################################
3
#
4
#   jats-installer Post Installation
5
#
6
#   This command is to be executed in the directory in which it is found
7
#
8
#   Note: This MUST be a UNIX format file, not a DOS formatted file
9
#
10
#   The script may be called automatically when the package is released
11
#   into dpkg_archive. If this is then three arguments will be provided:
12
#       archive - name of the archive
13
#       name    - Name of this package
14
#       version - version of this package
15
#   This installer will create a symlink in the parent directory to 
16
#   assist in the timely rollout of a new version of jats-installre.
17
#       The script will create a symlink from current to this version
18
#
19
########################################################################
20
#
21
#
22
#   Sanity test
23
#
24
#   If run by the build system
25
#       Must have at least 3 args
26
#       3rd arg must be this version of the package    
27
#   Create a symlink in the parent diretory to this version
28
#
29
if [ $# -ge 3 ]; then
30
    thisVer=${PWD##*/}
31
    if [ "$3" = "$thisVer" ] ; then
32
        echo "Creating current symlink to $thisVer"
33
        pushd .. >/dev/null
34
        rm -f current
35
        ln -s $thisVer current
36
        popd >/dev/null
37
    fi
38
fi
39
 
40
echo "jats-installer PostInstall Complete"
41