Subversion Repositories DevTools

Rev

Rev 1044 | Rev 6475 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1044 Rev 1050
Line 1... Line 1...
1
#
1
#
2
#   Receive a package version into dpkg_archive
2
#   Receive a package version into dpkg_archive
3
#   Script run by ssh to receive a compressed package and to save it
3
#   Script run by ssh to receive a compressed package and to save it
-
 
4
#   Works in bash and dash
4
#
5
#
5
#   Assumes that compressed tar output as stdin
6
#   Assumes that compressed tar output as stdin
6
#
7
#
7
#set -x
8
#set -x
8
set -e
9
set -e
9
 
10
 
10
function error {
11
error() {
11
    echo ERROR: $*
12
    echo ERROR: $*
12
    exit 1;
13
    exit 1;
13
}
14
}
14
 
15
 
15
function delete_dir {
16
delete_dir() {
16
    if [ -d "$1" ] ; then
17
    if [ -d "$1" ] ; then
17
            chmod -R u+w "$1"
18
            chmod -R u+w "$1"
18
            rm -rf "$1"
19
            rm -rf "$1"
19
    fi
20
    fi
20
}
21
}