Subversion Repositories DevTools

Rev

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

Rev 1042 Rev 1050
Line 1... Line 1...
1
#
1
#
2
#   Delete a package version from dpkg_archive
2
#   Delete a package version from dpkg_archive
3
#   Script run by ssh to delete a package
3
#   Script run by ssh to delete a package
-
 
4
#   Works in bash and dash
4
#
5
#
5
#set -x
6
#set -x
6
set -e
7
set -e
7
 
8
 
8
function error {
9
error() {
9
    echo ERROR: $*
10
    echo ERROR: $*
10
    exit 1;
11
    exit 1;
11
}
12
}
12
 
13
 
13
function delete_dir {
14
delete_dir() {
14
    if [ -e "$1" ] ; then
15
    if [ -e "$1" ] ; then
15
        chmod -R u+w "$1"
16
        chmod -R u+w "$1"
16
        rm -rf "$1"
17
        rm -rf "$1"
17
    fi
18
    fi
18
    
19
    
Line 93... Line 94...
93
    fi
94
    fi
94
    
95
    
95
    #
96
    #
96
    #   Try to remove package directory too
97
    #   Try to remove package directory too
97
    #
98
    #
98
    rmdir -p "$pkgdir" || true
99
    rmdir --ignore-fail-on-non-empty -p "$pkgdir" || true
99
    
100
    
100
 
101
 
101
    # Fix up permissions on the package and package-version
102
    # Fix up permissions on the package and package-version
102
    if [ -d "$pkgdir" ] ; then
103
    if [ -d "$pkgdir" ] ; then
103
        chmod a-w "$pkgdir"
104
        chmod a-w "$pkgdir"