mirror of https://github.com/zulip/zulip.git
install: Try apt-get update if the Ubuntu universe check fails.
On a system where ‘apt-get update’ has never been run, ‘apt-cache policy’ may show no repositories at all. Try to correct this with ‘apt-get update’ before giving up. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
3138f7a73c
commit
0b454dda12
|
@ -232,8 +232,12 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$os_id" = ubuntu ] && ! apt-cache policy \
|
has_universe() {
|
||||||
| grep -q "^ release v=$os_version_id,o=Ubuntu,a=$os_version_codename,n=$os_version_codename,l=Ubuntu,c=universe"; then
|
apt-cache policy \
|
||||||
|
| grep -q "^ release v=$os_version_id,o=Ubuntu,a=$os_version_codename,n=$os_version_codename,l=Ubuntu,c=universe"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$os_id" = ubuntu ] && ! has_universe && ! { apt-get update && has_universe; }; then
|
||||||
set +x
|
set +x
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue