Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit050e4b0

Browse files
committed
Merge branch 'rel_future_beta' into migration_to_pg10_v2
2 parents981e769 +2a57b63 commit050e4b0

File tree

1 file changed

+3
-79
lines changed

1 file changed

+3
-79
lines changed

‎travis/apt.postgresql.org.sh

Lines changed: 3 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,11 @@
11
#!/bin/sh
22

3-
# script to add apt.postgresql.org to sources.list
4-
5-
# from command like
6-
CODENAME="$1"
7-
# lsb_release is the best interface, but not always available
8-
if [-z"$CODENAME" ];then
9-
CODENAME=$(lsb_release -cs2>/dev/null)
10-
fi
11-
# parse os-release (unreliable, does not work on Ubuntu)
12-
if [-z"$CODENAME"-a-f /etc/os-release ];then
13-
. /etc/os-release
14-
# Debian: VERSION="7.0 (wheezy)"
15-
# Ubuntu: VERSION="13.04, Raring Ringtail"
16-
CODENAME=$(echo$VERSION| sed -ne's/.*(\(.*\)).*/\1/')
17-
fi
18-
# guess from sources.list
19-
if [-z"$CODENAME" ];then
20-
CODENAME=$(grep'^deb' /etc/apt/sources.list| head -n1| awk'{ print $3 }')
21-
fi
22-
# complain if no result yet
23-
if [-z"$CODENAME" ];then
24-
cat<<EOF
25-
Could not determine the distribution codename. Please report this as a bug to
26-
pgsql-pkg-debian@postgresql.org. As a workaround, you can call this script with
27-
the proper codename as parameter, e.g. "$0 squeeze".
28-
EOF
29-
exit 1
30-
fi
31-
32-
# errors are non-fatal above
33-
set -e
34-
35-
cat<<EOF
36-
This script will enable the PostgreSQL APT repository on apt.postgresql.org on
37-
your system. The distribution codename used will be$CODENAME-pgdg.
38-
39-
EOF
40-
41-
case$CODENAMEin
42-
# known distributions
43-
sid|wheezy|squeeze|lenny|etch) ;;
44-
precise|lucid) ;;
45-
*)# unknown distribution, verify on the web
46-
DISTURL="http://apt.postgresql.org/pub/repos/apt/dists/"
47-
if [-x /usr/bin/curl ];then
48-
DISTHTML=$(curl -s$DISTURL)
49-
elif [-x /usr/bin/wget ];then
50-
DISTHTML=$(wget --quiet -O -$DISTURL)
51-
fi
52-
if ["$DISTHTML" ];then
53-
if!echo"$DISTHTML"| grep -q"$CODENAME-pgdg";then
54-
cat<<EOF
55-
Your system is using the distribution codename$CODENAME, but$CODENAME-pgdg
56-
does not seem to be a valid distribution on
57-
$DISTURL
58-
59-
We abort the installation here. Please ask on the mailing list for assistance.
60-
61-
pgsql-pkg-debian@postgresql.org
62-
EOF
63-
exit 1
64-
fi
65-
fi
66-
;;
67-
esac
68-
69-
#echo -n "Press Enter to continue, or Ctrl-C to abort."
70-
#
71-
#read enter
3+
# OS version
4+
CODENAME=trusty
725

736
echo"Writing /etc/apt/sources.list.d/pgdg.list ..."
747
cat> /etc/apt/sources.list.d/pgdg.list<<EOF
75-
deb http://apt.postgresql.org/pub/repos/apt/$CODENAME-pgdg main
76-
#deb-src http://apt.postgresql.org/pub/repos/apt/$CODENAME-pgdg main
8+
deb http://apt.postgresql.org/pub/repos/apt/$CODENAME-pgdg main$PGVERSION
779
EOF
7810

7911
echo"Importing repository signing key ..."
@@ -126,11 +58,3 @@ EOF
12658

12759
echo"Running apt-get update ..."
12860
apt-get update
129-
130-
cat<<EOF
131-
132-
You can now start installing packages from apt.postgresql.org.
133-
134-
Have a look at https://wiki.postgresql.org/wiki/Apt for more information;
135-
most notably the FAQ at https://wiki.postgresql.org/wiki/Apt/FAQ
136-
EOF

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp