Skip to content

Instantly share code, notes, and snippets.

@jzacsh
Last active August 28, 2021 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jzacsh/21ff8a17e041f8c91009e6f07c675070 to your computer and use it in GitHub Desktop.
Save jzacsh/21ff8a17e041f8c91009e6f07c675070 to your computer and use it in GitHub Desktop.
migrated to https://gitlab.com/jzacsh/desktop-setup - laptop/desktop owner; debian sid setup

Setup Machine You Own

Quickly sets up my list of preferred packages, side-loading pkg managers, system config, etc. Intended, obvz, for a machine I own and basically have no other users on

Example Usage

  git clone https://gist.github.com/21ff8a17e041f8c91009e6f07c675070.git /tmp/jonsetup
  time {
    ./laptop_debian-sid.sh \
    ./dpkg.sid.log \
    ./laptop-pkg-sideload.sh \
    ./laptop-sys-configure.sh
  } 2>&1 | tee -a ./jonsetup.log
  # look for any notes you left yourself for manual steps:
  grep -E TODO.install jonsetup.log
google-chrome
keybase-bin
restic
arp-scan 1.9-3
asciidoc 8.6.9-3
asciidoctor 1.5.6.1-1
borg 1.0.11-1
clang 4.0.1-5
colordiff 1.0.18-1
ctags 5.8-5
detox 1.3.0-1
dictd 1.12.1-5
feh 2.20-1
git 2.14.1-1
go 2:1.9-1
gradle 4.1-1
gradle-doc 4.1-1
htop 2.0.2-2
inotify-tools 3.14-4
keepassx2 2.0.3-1
mpv 1:0.27.0-1
neovim 0.2.0-2
nodejs 8.5.0-1
npm 5.3.0-1
octave 4.2.1-7
openjdk8-doc 8.u144-1
openjdk8-src 8.u144-1
python-pip 9.0.1-2
python-pygments 2.2.0-1
rlwrap 0.43-1
rxvt-unicode 9.22-5
source-highlight 3.1.8-12
strace 4.18-1
syncthing 0.14.37-1
tmux 2.5-3
typescript 2.5.2-1
valgrind 3.13.0-3
virtualbox 5.1.28-1
weechat 1.9-4
wkhtmltopdf 0.12.4-1
wmctrl 1.07-4
xsel 1.2.0.20160929-1
zathura 0.3.7-1
zathura-pdf-mupdf 0.3.1-3
bash-completion 2.7-1
libu2f-host 1.1.3-2
# TODO comment inline w/URLs to unofficial REPOs, or list them first here at the top as a format choice
grc
cm-super
arp-scan
tcpdump
tcpflow
#TODO: if on a desktop:
# iptables-persistent
rxvt-unicode-256color
apt-transport-https
pinentry-curses # my preferred UI for gpg agent
git
#redshift-gtk # gnome3 now has this built into settings
redshift # xfce4 needs an explicit app
inotify-tools
mpv
#TODO: not sure i wanat these anymore;
# mpd
# ncmpcpp
autoconf
build-essential
cmake
checkinstall
colordiff
weechat
detox
python3-pygments
source-highlight
strace
webp
#TODO: consider if you've ever used this well:
# cscope
exuberant-ctags
htop
python3-setuptools
python3-pip
xsel
unzip
curl
gradle
tmux
rlwrap
wkhtmltopdf
sassc
#broken on pop_os (system76 thing)
pidcat
how-can-i-help
feh
zathura
exiftool
#TODO: borgbackup --install-suggests
borgbackup
clang
clang-format
valgrind
mlocate
graphviz
# github.com/amanusk/s-tui
s-tui
octave
# vim
neovim
python3-neovim
ruby-neovim
# for unit testing things. just temporarily while unprivileged lxc is impossibly
# difficult to setup
virt-manager
# virt-manager because virtualbox is unavailable per https://wiki.debian.org/VirtualBox#Debian_10_.22Buster.22
#virtualbox
vagrant
lxc
runc
podman
# i3wm usage
#i3
#i3blocks
#blueman
#dex
#xss-lock
#xbacklight
#fonts-font-awesome
# from http://www.johnath.com/beep/
beep
# for running a debian sid system
#apt-listbugs
apt-listchanges
# TODO probably old and can delete:
# via unofficial repository (and key)
#google-chrome-stable # TODO add to repos, or remove this line
#google-chrome-unstable # TODO add to repos, or remove this line
# NOTE: requires official 3rd party "nodesource" repository first, per:
# https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
nodejs
snapd
# used by urxvtc extension to go to fullscreen
wmctrl
# TODO probably old and can delete:
## for android development
#lib32z1
#lib32ncurses5
#lib32stdc++6
# for laptop, specifically:
#TODO add optional apt-get args to this file, eg: tlp should be installed
#with `--install-suggests`
tlp
# desktop things
gimp
inkscape
# offline dictionary access, per http://askubuntu.com/a/417132
gnome-dictionary
dict
dictd
dict-devil
dict-wn
dict-gcide
# for tomb usage
zsh
qrencode
dcfldd
# it's nice to have pretty fonts
fonts-ubuntu
fonts-ubuntu-console
fonts-liberation2
ttf-mscorefonts-installer
bash-completion
thunderbird
keepassxc
yubikey-personalization-gui
dconf-editor
# https://github.com/rbenv/rbenv#using-package-managers
rbenv
cups
#!/usr/bin/env bash
set -euo pipefail
pushd ~/tmp/build
echo "getting vcprompt"
curl -O http://hg.gerg.ca/vcprompt/archive/tip.tar.gz
tar -xvf tip.tar.gz
pushd vcprompt*
autoconf
./configure
make
mv -v vcprompt ~/bin/local/
popd # vcrompt-*
rm ./vcprompt* tip.tar.gz -rf
echo "getting tmux plugins setup..."
mkdir -vp ~/.tmux/plugins/
git clone --quiet git://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "NOTE: must manually remember to C-I (for 'install') on first tmux use!" >&2
echo 'installing golang fonts, eg: "Go Mono"'
git clone --quiet https://go.googlesource.com/image golang-image
mkdir -vp ~/.local/share/fonts/
find golang-image/font/gofont/ttfs/ \
-mindepth 1 -maxdepth 1 -type f -name '*.ttf' \
-exec cp -vp {} ~/.local/share/fonts/ \;
rm -rf golang-image
echo 'installing user borgmatic bin for backups'
pip3 install --user --upgrade borgmatic
# NOTE: keep in sync with share/zacsh_exports of github.com/jzacsh/bin
export GOPATH="$HOME"/usr/local/go
export PATH="$GOPATH"/bin:"$PATH"
################################################
# all elevated privelege actions below this line
################################################
echo "refreshing font caches"
sudo fc-cache -fv
echo "getting typescript"
sudo npm install -g typescript
printf \
'installing reclone afresh per\n\t%s\n' \
'https://rclone.org/downloads' >&2
( set -x; curl https://rclone.org/install.sh | sudo bash; )
# https://keybase.io/docs/the_app/install_linux
echo 'installing keybase'
(
deb="$(mktemp --tmpdir=. 'keybase-deb_XXXXX.deb')"
curl -s https://prerelease.keybase.io/keybase_amd64.deb > "$deb"
set -x
sudo apt-get install "$deb"
)
# https://element.io/get-started
echo 'installing element (matrix.org) desktop client'
sudo apt-get install -y apt-transport-https
curl -sL https://packages.riot.im/debian/riot-im-archive-keyring.gpg |
sudo tee /usr/share/keyrings/riot-im-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/riot-im-archive-keyring.gpg] https://packages.riot.im/debian/ default main' |
sudo tee /etc/apt/sources.list.d/riot-im.list
sudo apt-get update
sudo apt-get install -y element-desktop
echo 'TODO(install): go install github.com/jurplel/qView via AppImage'
echo "TODO(install) go run rbenv doctor and see what's left: github.com/rbenv/rbenv#using-package-managers"
echo "TODO(install) once rbenv doctor passes, go install software via gem packages: laptop-post-rbenv.sh"
echo 'TODO(install) go setup signal.org chat per signal.org/en/download'
# (
#
# signalKeyring="$(mktemp --tmpdir=. 'signal-desktop-keyring_XXXXXX.gpg')"
# curl -s https://updates.signal.org/desktop/apt/keys.asc |
# gpg --dearmor > "$signalKeyring"
# sudo mv -v "$signalKeyring" /usr/share/keyrings/signal-desktop-keyring.gpg
# echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |
# sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
# sudo apt-get update
# sudo apt-get install -y signal-desktop
# )
#
# TODO: for some reason Pop_OS fresh install (with updates applied/reboots/etc.
# --> ie: at the above results in "20.04 LTS") with the above command results in
# the following on `apt-get update`:
# $ sudo apt-get update
# Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
# Get:2 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]
# Get:3 https://updates.signal.org/desktop/apt xenial InRelease [2,316 B]
# Hit:4 https://deb.nodesource.com/node_14.x focal InRelease
# Hit:5 http://prerelease.keybase.io/deb stable InRelease
# Hit:6 http://ppa.launchpad.net/system76/pop/ubuntu focal InRelease
# Get:7 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
# Hit:8 http://apt.pop-os.org/proprietary focal InRelease
# Get:9 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
# Err:3 https://updates.signal.org/desktop/apt xenial InRelease
# The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D980A17457F6FB06
# Hit:10 http://ppa.launchpad.net/yubico/stable/ubuntu focal InRelease
# Hit:11 https://packages.riot.im/debian default InRelease
# Hit:12 http://dl.google.com/linux/chrome/deb stable InRelease
# Reading package lists... Done
# W: GPG error: https://updates.signal.org/desktop/apt xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D980A17457F6FB06
# E: The repository 'https://updates.signal.org/desktop/apt xenial InRelease' is not signed.
# N: Updating from such a repository can't be done securely, and is therefore disabled by default.
# N: See apt-secure(8) manpage for repository creation and user configuration details.
#
#jzacsh@ rm'd as no longer using snap excessively
#sudo snap install signal-desktop
#!/usr/bin/env bash
set -euo pipefail
echo 'trying to fetch hugo golang binaries...'
go get github.com/gohugoio/hugo
echo 'trying to fetch HTML cli parser'
go get github.com/ericchiang/pup
echo 'trying to fetch punch timer tracker'
go get github.com/jzacsh/punch/cmd/punch
echo 'trying to fetch runonchange'
go get github.com/jzacsh/runonchange
echo 'trying to fetch godoc cli'
go get golang.org/x/tools/cmd/godoc
echo 'trying to fetch golang dependency analysis tool'
go get github.com/loov/goda
#!/usr/bin/env bash
set -euo pipefail
echo 'trying to side-load asciidoctor'
gem install asciidoctor
#!/usr/bin/env bash
set -euo pipefail
adminUsr="$1"; declare -r adminUsr
# sanity checks
if [[ -z "${adminUsr/ */}" || "$adminUsr" = root ]];then
printf "Error: must provide USER arg (machine's effective owner)!\n" >&2
exit 1
fi
[[ "$EUID" -eq 0 ]] || {
printf 'Error: called incorrectly; must be run as root!\n' >&2
exit 1
}
usermod --append --groups adm "$adminUsr"
# Being primary user, we likely have long running jobs, multiplexers open, etc.
loginctl enable-linger "$adminUsr"
# In a similar vein: do not kill when we have logouts:
cp -v /etc/systemd/logind.conf{,_"$(date --iso-8601=d)".orig}
sed -i 's/^[[:space:]]*#\(KillUserProcesses\)=.*$/\1=no/' /etc/systemd/logind.conf
# enable persistent cross-boot journalctl logs
# per: https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs
[[ -d /var/log/journal ]] || mkdir /var/log/journal
if ! grep -E '^Storage=persistent$' /etc/systemd/journald.conf >/dev/null 2>&1;then
cp -v /etc/systemd/journald.conf{,.orig-"$(date --iso-8601)"}
sed --in-place \
's/^#\?\(Storage\)=.*$/\1=persistent/g' \
/etc/systemd/journald.conf
fi
# Set urxvtc as my preferred terminal
update-alternatives --install \
/usr/bin/x-terminal-emulator x-terminal-emulator \
/usr/bin/urxvtc 100
update-alternatives --set x-terminal-emulator /usr/bin/urxvtc
# borg backup system
pip3 install --user --upgrade borgmatic
# prefer google's public dns servers
if [[ -d /etc/resolvconf/resolv.conf.d ]];then
resolvConfBase=/etc/resolvconf/resolv.conf.d/base
if [[ -r "$resolvConfBase" ]] &&
[[ "$(stat --printf '%s\n' "$resolvConfBase")" != '0' ]];then
cp -v "$resolvConfBase"{,_"$(date --iso-8601=d)".orig}
fi
printf 'nameserver 8.8.8.8\nnameserver 8.8.4.4\n' > "$resolvConfBase"
fi
# ensure both aspects of plug/unplug of a headphone/mic set behave as expected
#
# https://askubuntu.com/a/158250
# https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-switch-on-connect
declare -r audioConf=/etc/pulse/default.pa
if [[ -s "$audioConf" ]];then
printf 'TODO(install) fix headphone plug/unplug by doing:
1) open %s file
2) follow instructions in comments (e.g. importance of order of modules being loaded)
3) ensure you have _both_ these `load-module` lines:
%s
%s
More at https://askubuntu.com/a/158250\n' \
"$audioConf" \
'load-module module-switch-on-connect' \
'load-module module-switch-on-port-available'
else
echo 'TODO(install) ensure headphone plug/unplug works; apparently not using pulseaudio right now'
fi
#2021-05-29 disabled as this consistently breaks thinkpad trackpoint system (and
#doesn't work universally anyway - e.g., in XFCE this has no impact)
#
# naturalScrollingConf=/usr/share/X11/xorg.conf.d/11-natural-scrolling.conf
# declare -r naturalScrollingConf
# if [[ -e "$naturalScrollingConf" ]];then
# printf \
# 'WARNING: moving pre-existing conf out of way! Double check its contents:\n\t%s\n' \
# "$naturalScrollingConf" >&2
# mv -v "$naturalScrollingConf"{,.orig}
# fi
# cat > "$naturalScrollingConf" <<END_OF_NATURAL_SCROLLING_CONF
# # jzacsh@ manual injected this file (via
# # gist.github.com/jzacsh/21ff8a17e041f8c91009e6f07c675070 script)
# # Following comment in: https://bugzilla.gnome.org/show_bug.cgi?id=682457#c35
# Section "InputClass"
# Identifier "natural scrolling for mouse wheel"
# MatchIsPointer "on"
# MatchDevicePath "/dev/input/event*"
# Driver "mouse"
# Option "Device" "/dev/input/mice"
# Option "Protocol" "Auto"
# Option "ZAxisMapping" "5 4"
# EndSection
# END_OF_NATURAL_SCROLLING_CONF
#actually this is a beautiful thing; only wanna kill this when i'm in a special
#system and i'm half-ass using gnome, but not _really_ using gnome
# gnomeSshKeyring=/etc/xdg/autostart/gnome-keyring-ssh.desktop
# declare -r gnomeSshKeyring
# if [[ -e "$gnomeSshKeyring" ]];then
# mv -v "$gnomeSshKeyring"{,_disabled-"$(date --iso-8601)"}
# fi
# remove deja-dup software; wouldn't have even noticed the software installed if
# i didn't find it eating my CPU...
#apt-get remove deja-dup
echo 'TODO(install): consider if deja-dup is installed and auto-running!'
# disable "tracker" software eating my CPU/mem, and unwanted anyway
# per https://askubuntu.com/a/348692/426803
#
# NOTE: "hidden" means deleted; see https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#key-hidden
echo -e "\nHidden=true\n" | sudo tee --append \
/etc/xdg/autostart/tracker-{extract,store,miner-{apps,fs,user-guides}}.desktop > /dev/null
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false
tracker reset --hard
echo 'NOTE: giving you a chance to switch pinentry to curses now:'
update-alternatives --config pinentry
printf \
'TODO(install): GO INSTALL tomb command from tar release:\n\t%s\n' \
'github.com/dyne/Tomb/blob/master/INSTALL.md#install-tomb' >&2
printf 'WARNING: IF librem13, UNCOMMENT last lines your touchpad!\n' >&2
#printf '%s\n' \
# '#!/bin/bash' \
# '# jzacsh 20170921, taken from: https://forums.puri.sm/t/byd-touchpad-multi-touch-support/915/4' \
# 'echo -n byd > /sys/bus/serio/devices/serio1/protocol' | tee /etc/rc.local
#chmod 744 /etc/rc.local
#!/usr/bin/env bash
#
# steps:
# 1. assume: $USER is primary on machine (eg: owner of a laptop)
# 2. assume: system has been set to debian sid (eg: prefer bleeding edge)
# 3. "$1" is a file listing desired apt-get installable packages
# 4. "$2" is a fragile script for side-installing
# (eg: delicate from-source installations, each likely project specific)
# 5. *this* script should setup $HOME dir layout including bin & dotfiles
# 6. "$3" is fragile script to custom-configure system
# (eg: "natural scrolling" via Xorg confs, or disabling tap-to-click)
set -euo pipefail
(( BASH_VERSINFO[0] < 4 )) && exit 99 # panic and tear hair out
setupSteps=(
'ASSUMING this is primarily your machine'
'ASSUMING this is a debian sid machine (bleeding edge software)'
'setup $HOME dir layout, including bin/ and dotfiles'
'apt-get install packages from DPKG_LIST listing one per line'
'use SIDE_LOAD_SH to get other binaries (eg: compile from tarballs, use pip, cpan, etc.)'
'use SYS_CONFIG_SH to custom-configure system settings (eg: periphs, groups, xor, etc.)'
); declare -r setupSteps
type git >/dev/null 2>&1 || {
printf 'Error: `git` must be in $PATH to start\n' >&2
exit 1
}
die() ( printf 'fatal error, see above.\n' >&2; exit 1; )
# commandline usage interaction
[[ $# -eq 3 ]] || {
printf \
'`usage: DPKG_LIST SIDE_LOAD_SH SYS_CONFIG_SH` will (in this order) do:\n%s\n\n' \
"$(printf '\t- "%s"\n' "${setupSteps[@]}")" >&2
exit 1
}
dpkgList="$(readlink -f "$1")"; declare -r dpkgList; [[ -r "$dpkgList" ]]
sideLoad="$(readlink -f "$2")"; declare -r sideLoad; [[ -x "$sideLoad" ]]
sysConfig="$(readlink -f "$3")"; declare -r sysConfig; [[ -x "$sysConfig" ]]
stepCompleted=0
reportProgress() (
(( stepCompleted == 6 )) && {
printf 'SUCCESS: apparently achieved all %s steps\n' "${#setupSteps[@]}" >&2
return 0
}
local step
printf \
'WARNING: exiting EARLY; only finished step %s of %s; summary:\n' \
"$stepCompleted" "${#setupSteps[@]}"
local stepStatus i=1
for step in "${setupSteps[@]}";do
if (( i <= stepCompleted ));then
stepStatus='[DONE]'
else
stepStatus='[FAILED]'
fi
printf '\t%.10s %s of %s:\t"%s"\n' \
"$stepStatus" "$i" "${#setupSteps[@]}" \
"${setupSteps[${i}-1]}" >&2
i=$(( i + 1 ))
done
)
trap reportProgress exit
logStep() (
set +x
stepCompleted=$(( $1 - 1 ))
if (( stepCompleted ));then
printf '[FINISHED] %s of %s:\n\t%s\n\n' \
"$stepCompleted" "${#setupSteps[@]}" \
"${setupSteps[${stepCompleted}-1]}" >&2
sudo --remove-timestamp # clear previously earned creds
fi
printf '[STARTING] %s of %s:\n\t%s\n' \
"$1" "${#setupSteps[@]}" "${setupSteps[${1}-1]}" >&2
set -x
)
DEBUG=0 # change this value freely!
if (( DEBUG ));then
echo 'WARNING: this is debug mode!' >&2
mv() ( echo "[debug]mv" "$@"; )
rm() ( echo "[debug]rm" "$@"; )
mkdir() ( echo "[debug]mkdir" "$@"; )
ln() ( echo "[debug]ln" "$@"; )
sudo() ( echo "[debug]sudo" "$@"; )
crontab() ( echo "[debug]crontab" "$@"; )
fi
logStep 1 # assume primary machine
logStep 2 # assume debian sid
logStep 3 # layout homedir
# $1=github "username/repo" string to clone
# $2=directory to clone into
gitCloneOwnedGithub() (
git clone --quiet "https://github.com/$1" "$2"
cd "$2"
git remote set-url origin --push git@github.com:"$1"
)
cd # home
privateDots=(.gnupg/* .ssh/config .aws/config); declare -r privateDots
nonXdgDirs=(back/ .gnupg/ tmp/{build,src} usr/{log/arch,share{,/appimage},lib/{,go,sh,deno,rust/{cargo,rustup}}} .config/)
declare -r nonXdgDirs
mkdir -p ${nonXdgDirs[@]} # Unpack my bag o scripts...
chmod 7777 tmp/
gitCloneOwnedGithub jzacsh/bin bin
mkdir -p bin/local
gitCloneOwnedGithub jzacsh/dotfiles back/dots
gitCloneOwnedGithub jzacsh/yabashlib usr/lib/sh/yabashlib
mvIfPwdOrig() (
local orig; orig="$(basename "$1")"
[ -e "$orig" ] || return 0
printf '\tWARNING: moving existing file, "%s"\n' "${orig}" >&2
mv --verbose "$orig"{,.orig}
)
# delete the default ones
rmdir ~/{Desktop,Pictures,Downloads,Music,Documents,Videos,Templates,Public}/
# organize furniture
while read line; do
[[ $line =~ ^XDG ]] || continue # skip; not a DIR configuration
tmp="${line/XDG*=/}" # get the config value
# strip surrounding quotes
tmp="${tmp%\"}"
tmp="${tmp#\"}"
# eval vars. eg: tmp='$HOME/foo' -> '/home/jzacsh/foo'
dir="$(eval echo -n "$tmp")"
mkdir -p "$dir"
done < ~/back/dots/.config/user-dirs.dirs
# get my own source directory started
mkdir ~/media/src/
# get my own reomte provider dir started
mkdir -p ~/silos/{content,config}
find ~/back/dots/ -maxdepth 1 -mindepth 1 -name '\.*' -print | while read dot; do
f="$(basename "$dot")"
[[ "$f" = .config ]] && continue # skip; see next section
mvIfPwdOrig "$dot"
ln --symbolic --verbose "$dot"
done
# deal w/manual imperfections of a simple dots directory....
rm .git # symlink to .git/ repo directory of ~/back/dots/
rm .gitignore # this is .gitignore for ~/back/dot/ *repo*
mv .gitignore{_global,} # *this* is the gitignore for $HOME
pushd ~/.config/ # map tracked ~/.config/ content to local .config dir on disk
find ~/back/dots/.config/ -mindepth 1 -maxdepth 1 -print | while read configFile; do
mvIfPwdOrig "$configFile"
ln --symbolic --verbose "$configFile"
done
popd # from ~/.config/
chmod 700 .gnupg/ # should be rw (and executable) only to you
pushd ~/.gnupg/
find ~/.config/ -mindepth 1 -maxdepth 1 -name 'gpg*.conf' -print | while read gpgconf; do
mvIfPwdOrig "$gpgconf"
ln --symbolic --verbose "$gpgconf"
done
popd # from ~/.gnupg/
# Finished; Now log stuff that can't be public or automated
printf 'TODO(install): go install:\n\t%s\n' ${privateDots[@]}
# printf 'TODO(install): run `opam init` once!' >&2
# printf 'TODO(install): run `opam install ocp-indent` once!' >&2
printf 'TODO(install): golang not installed; run then:\n'
printf '\tmanually run ./laptop-post-golang.sh\n'
printf '\tmanually run `:GoInstallBinaries` in vim\n'
logStep 4 # install debian packages
# as of 2021-04-09, this is the LTS release
# Taken from
# https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions
# According to
# https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
printf 'preparing apt repos so nodejs is available...\n'
sudo apt install curl
sudo bash -c 'curl -fsSL https://deb.nodesource.com/setup_14.x | bash -' || die
pkgList() (
grep --invert-match --extended-regexp '^#' "$dpkgList" |
sed -e 's|\s*#.*$||g' |
sed '/^\s*$/'d |
sort |
uniq
)
finalList="$(readlink -f "$(mktemp --tmpdir=. 'dpkg_list.XXXXXX.txt')")"
printf 'writing install list to\n\t%s\n' "$finalList"
pkgList > "$finalList"
sudo apt update
sudo apt install $(printf ' %s ' "$(pkgList)") # no quotes; multi-arg passing to apt-get
sudo apt update
logStep 5 # side load software
"$sideLoad"
logStep 6 # general system configuration prefs
sudo "$sysConfig" "$USER"
stepCompleted=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment