3
# Load debconf variables
4
. /usr/share/debconf/confmodule
7
4
conffile=$confdir/goinstall.conf
11
if [ -e $conffile ] ; then
12
# Fetch current values.
16
# Get this setting from debconf. It was set based on the content of
17
# /etc/golang/goinstall.conf in the 'config' script, so it should be
18
# safe to ignore the value fetched by loading the file above. This
19
# should allow for using debconf to reconfigure the package.
20
db_get golang-go/dashboard || true
21
if [ "$RET" = "yes" ] || [ "$RET" = "YES" ] || [ "$RET" = "true" ]; then
28
if [ ! -d $confdir ]; then
32
# Config file for goinstall tool.
34
# To change this file, use:
35
# dpkg-reconfigure golang-go
37
# You can also edit it by hand, if you so choose.
39
DASHBOARD="$DASHBOARD"
42
# Make sure user nobody can read the file.
8
. /usr/share/debconf/confmodule
10
# Cleanup old debconf dashboard question that was removed in golang-go 2:1.1
11
# -- 2013-05-14 stapelberg
48
if [ ! -e $conffile ]; then
51
# Replace only if the content changed, to avoid changing the
52
# config file date when no change was done.
54
s/^DASHBOARD=.*$/DASHBOARD=\"$DASHBOARD\"/; \
56
if sed "$sedopts" < $conffile > $conffile.new &&
57
! cmp $conffile $conffile.new > /dev/null; then
58
mv $conffile.new $conffile
59
# Make sure user nobody can read the file.
16
# Remove obsolete goinstall.conf.
17
# -- 2013-05-14 stapelberg
18
if [ -e $conffile ]; then
20
rmdir /etc/golang || true
65
22
# Very ugly hack to set timestamps same as /usr/bin/go
66
23
find /usr/lib/go/pkg -exec touch -r /usr/bin/go {} \;