Compare commits

...

4 Commits

4 changed files with 34 additions and 22 deletions

View File

@ -7,7 +7,7 @@ set -x
# I know there are old versions that used something else, but I don't remember # I know there are old versions that used something else, but I don't remember
# that name and they are ancient. # that name and they are ancient.
if ! hash nmcli 2>/dev/null; then if ! hash nmcli 2> /dev/null; then
echo "You don't seem to have NetworkManager (or nmcli) installed." 1>&2 echo "You don't seem to have NetworkManager (or nmcli) installed." 1>&2
exit 1 exit 1
fi fi

16
install
View File

@ -53,6 +53,22 @@ if hash pre-commit 2> /dev/null; then
pre-commit gc pre-commit gc
fi fi
if hash corepack 2> /dev/null; then
corepack enable --install-directory ~/.local/bin/
corepack enable npm --install-directory ~/.local/bin/
else
echo "WARNING! corepack is not installed."
fi
if [ "$(id -u)" == "0" ]; then
mkdir -vp /etc/apt/apt.conf.d/
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color
if hash updatedb 2> /dev/null; then
(updatedb &)
fi
fi
if [ -f "$MIKAELA_GREP" ]; then if [ -f "$MIKAELA_GREP" ]; then
bash -x .mikaela_install bash -x .mikaela_install
fi fi

View File

@ -233,11 +233,11 @@ UNAME=$(uname)
CPUARCH=$(uname -p) CPUARCH=$(uname -p)
# If we are on Linux, enable apt progress bar and colours # If we are on Linux, enable apt progress bar and colours
if [[ $USER == "root" ]]; then #if [[ $USER == "root" ]]; then
mkdir -p /etc/apt/apt.conf.d/ # mkdir -p /etc/apt/apt.conf.d/
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar # echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color # echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color
fi #fi
# if gpg[-agent] has sshcontrol file, use it as ssh-agent. sshcontrol should # if gpg[-agent] has sshcontrol file, use it as ssh-agent. sshcontrol should
# include the authentication subkey keygrip from # include the authentication subkey keygrip from
@ -735,11 +735,11 @@ function shell-things {
# (Everything expects nodejs to be called as node, but it's not with Debian.) # (Everything expects nodejs to be called as node, but it's not with Debian.)
fix-node() { fix-node() {
if [[ $USER == "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]]; then if [[ $USER == "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]]; then
ln -s /usr/bin/nodejs /usr/local/bin/node ln -fnsv /usr/bin/nodejs /usr/local/bin/node
fi fi
mkdir -p $HOME/.local/bin mkdir -vp "$HOME/.local/bin"
if [[ -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node && ! -f $HOME/.local/bin/node ]]; then if [[ -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node && ! -f $HOME/.local/bin/node ]]; then
ln -s /usr/bin/nodejs $HOME/.local/bin/node ln -fnsv /usr/bin/nodejs "$HOME/.local/bin/node"
fi fi
} }

View File

@ -215,11 +215,11 @@ else
fi fi
# If we are on Linux, enable apt progress bar and colours # If we are on Linux, enable apt progress bar and colours
if [[ $USER = "root" ]]; then #if [[ $USER = "root" ]]; then
mkdir -p /etc/apt/apt.conf.d/ # mkdir -p /etc/apt/apt.conf.d/
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar # echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color # echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color
fi #fi
# OS X ls colours (copied from https://apple.stackexchange.com/questions/33677/ # OS X ls colours (copied from https://apple.stackexchange.com/questions/33677/
export CLICOLOR=1 export CLICOLOR=1
@ -582,8 +582,8 @@ else
echo "WARNING! corepack is not installed." echo "WARNING! corepack is not installed."
fi fi
# https://pnpm.io/installation#using-a-shorter-alias # https://pnpm.io/installation#using-a-shorter-alias
alias pn="corepack pnpm" alias pn="corepack pnpm"
# github-pages etc. # github-pages etc.
if hash bundle 2>/dev/null; then if hash bundle 2>/dev/null; then
@ -724,17 +724,13 @@ cd
# This function fixes nodejs on Debian based systems. # This function fixes nodejs on Debian based systems.
# (Everything expects nodejs to be called as node, but it's not with Debian.) # (Everything expects nodejs to be called as node, but it's not with Debian.)
function fix-node { function fix-node {
if [[ $USER = "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]] then; if [[ $USER = "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]] then;
ln -s /usr/bin/nodejs /usr/local/bin/node ln -fnsv /usr/bin/nodejs /usr/local/bin/node
fi fi
mkdir -p $HOME/.local/bin mkdir -p $HOME/.local/bin
if [[ -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node && ! -f $HOME/.local/bin/node ]] then; if [[ -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node && ! -f $HOME/.local/bin/node ]] then;
ln -s /usr/bin/nodejs $HOME/.local/bin/node ln -fnsv /usr/bin/nodejs $HOME/.local/bin/node
fi fi
} }
# This function removes and regenerates ssh host keys. # This function removes and regenerates ssh host keys.