From: Mike Frysinger Date: Thu, 24 Sep 2020 04:18:20 +0000 (-0400) Subject: crostini-vapier-setup: add more packages & simplify a little X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6ba00e98257c3777c63600b1af5356d5fb73f881;p=home.git crostini-vapier-setup: add more packages & simplify a little --- diff --git a/.bin/crostini-vapier-setup b/.bin/crostini-vapier-setup index a2a6529..0afcd10 100755 --- a/.bin/crostini-vapier-setup +++ b/.bin/crostini-vapier-setup @@ -1,4 +1,14 @@ -#!/bin/bash +#!/bin/bash -ex + +if [[ $# -ne 0 ]]; then + echo "Usage: $0" + exit 1 +fi + +if [[ ${UID} -ne 0 ]]; then + exec sudo "$0" "$@" +fi + pkgs=( ipython ipython3 @@ -18,6 +28,7 @@ pkgs=( gimp inkscape mpv + sshfs steam autoconf @@ -34,12 +45,13 @@ pkgs=( dnsutils flex gcc + gdb gettext g++ git git-email git-svn - gdb + gnupg keychain libtool mosh @@ -54,8 +66,11 @@ pkgs=( subversion texinfo tree + unrar + unzip vim zeal + zip openjdk-11-jre-headless @@ -73,34 +88,34 @@ pkgs=( pkg-config zlib1g-dev ) -exec sudo bash -c ' -set -ex -printf "Defaults !tty_tickets\nDefaults timestamp_timeout=360\n" > /etc/sudoers.d/vapier + +printf "Defaults !tty_tickets\nDefaults timestamp_timeout=360\n" >/etc/sudoers.d/vapier chmod 440 /etc/sudoers.d/vapier # Add non-free sources for Steam. sed -i "/^deb .*\/debian .* main$/s:$: contrib non-free:" /etc/apt/sources.list dpkg --add-architecture i386 -curl "https://dl-ssl.google.com/linux/linux_signing_key.pub" | apt-key add - +curl -s "https://dl-ssl.google.com/linux/linux_signing_key.pub" | apt-key add - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >/etc/apt/sources.list.d/google-chrome.list +curl -s "https://packages.cloud.google.com/apt/doc/apt-key.gpg" | apt-key add - +echo "deb [arch=amd64] https://packages.cloud.google.com/apt cloud-sdk main" >/etc/apt/sources.list.d/google-cloud-sdk.list + apt-get update -apt-get dist-upgrade +apt-get -y dist-upgrade -apt-get -y install google-chrome-stable "$@" +apt-get -y install google-chrome-stable google-cloud-sdk ln -sf ~vapier/.profile.d/ROOT-bash_profile ~root/.bash_profile for f in .gitconfig .inputrc .nanorc ; do ln -sf ~vapier/${f} ~root/${f} done rm -f ~root/.profile ~root/.bashrc -echo . ~vapier/.profile.d/ROOT-bashrc > ~root/.bashrc +echo . ~vapier/.profile.d/ROOT-bashrc >~root/.bashrc rm -f /etc/motd -echo "[crostini]" > /etc/ps1_append +echo "[crostini]" >/etc/ps1_append rm -f /etc/ssh/sshd_not_to_be_run /usr/sbin/sshd - -' bash "${pkgs[@]}"