2
# @(#)copy.sh 19.1 (ESO-IPG) 02/25/03 13:51:10
5
# .LANGUAGE shell script
6
# .ENVIRONMENT Unix Systems. Executable under SHELL and C-SHELL
7
# .COMMENTS Copy file in first argument ($1) to the local directory.
8
# If the file exists previously, then it is renamed.
9
# .AUTHOR Carlos Guirao
10
# .VERSION 1.1 27-May-1988: Implementation
13
if [ ! -d $MIDASHOME/$MIDVERS/local/$1 ]; then
14
mkdir $MIDASHOME/$MIDVERS/local/$1
17
if [ -f $MIDASHOME/$MIDVERS/local/$1 ]; then
18
mv $MIDASHOME/$MIDVERS/local/$1 $MIDASHOME/$MIDVERS/local/${1}~
20
cp $1 $MIDASHOME/$MIDVERS/local/$1
21
chmod ug+rw $MIDASHOME/$MIDVERS/local/$1