File: ubuntu-dev-tools.preinst

package info (click to toggle)
ubuntu-dev-tools 0.101
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 696 kB
  • ctags: 505
  • sloc: python: 3,461; sh: 1,074; perl: 563; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 703 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

if [ -e /etc/bash_completion.d/pbuilder-dist/pbuilder-dist ]; then
    tmp_file="$(mktemp /etc/bash_completion.d/pbuilder-dist.XXXXXX)"
    mv -fv /etc/bash_completion.d/pbuilder-dist/pbuilder-dist \
        "$tmp_file"
    rmdir --ignore-fail-on-non-empty /etc/bash_completion.d/pbuilder-dist
    # dir non-empty
    if [ -d /etc/bash_completion.d/pbuilder-dist ]; then
        echo "W: /etc/bash_completion.d/pbuilder-dist not empty; moving /etc/bash_completion.d/pbuilder-dist out of the way"
        mv -fv /etc/bash_completion.d/pbuilder-dist /etc/bash_completion.d/pbuilder-dist.dpkg-disabled

    fi
    mv -fv "$tmp_file" /etc/bash_completion.d/pbuilder-dist
fi

#DEBHELPER#