mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
devcontainer/on-create-command: fix Ubuntu 18.04, add debugging.
Add some debugging information to be able to customise the prebuild/not cases for this script. Also, handle `zsh-autosuggestions` not being available for Ubuntu 18.04.
This commit is contained in:
parent
92e3ea0ecc
commit
bc4274fda0
@ -1,6 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# dump information variables for debugging
|
||||||
|
echo "==> env"
|
||||||
|
env | grep -v TOKEN
|
||||||
|
echo
|
||||||
|
echo "==> /etc/os-release"
|
||||||
|
cat /etc/os-release || true
|
||||||
|
echo
|
||||||
|
echo "==> /etc/lsb-release"
|
||||||
|
cat /etc/lsb-release || true
|
||||||
|
echo
|
||||||
|
echo "==> /etc/issue"
|
||||||
|
cat /etc/issue || true
|
||||||
|
echo
|
||||||
|
|
||||||
# fix permissions so Homebrew and Bundler don't complain
|
# fix permissions so Homebrew and Bundler don't complain
|
||||||
sudo chmod -R g-w,o-w /home/linuxbrew
|
sudo chmod -R g-w,o-w /home/linuxbrew
|
||||||
|
|
||||||
@ -15,12 +29,18 @@ brew cleanup
|
|||||||
|
|
||||||
# install some useful development things
|
# install some useful development things
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
APT_GET_INSTALL="openssh-server zsh"
|
||||||
|
|
||||||
|
# Ubuntu 18.04 doesn't include zsh-autosuggestions
|
||||||
|
if ! grep -q "Ubuntu 18.04" /etc/issue &>/dev/null
|
||||||
|
then
|
||||||
|
APT_GET_INSTALL="$APT_GET_INSTALL zsh-autosuggestions"
|
||||||
|
fi
|
||||||
|
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
-o Dpkg::Options::=--force-confdef \
|
-o Dpkg::Options::=--force-confdef \
|
||||||
-o Dpkg::Options::=--force-confnew \
|
-o Dpkg::Options::=--force-confnew \
|
||||||
openssh-server \
|
$APT_GET_INSTALL
|
||||||
zsh \
|
|
||||||
zsh-autosuggestions
|
|
||||||
|
|
||||||
# Start the SSH server so that `gh cs ssh` works.
|
# Start the SSH server so that `gh cs ssh` works.
|
||||||
sudo service ssh start
|
sudo service ssh start
|
||||||
|
Loading…
x
Reference in New Issue
Block a user