43 lines
1.2 KiB
Bash
Executable file
43 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
die() {
|
|
echo -e " ${NOCOLOR-\e[1;31m*\e[0m }${*}" >&2
|
|
exit 1
|
|
}
|
|
|
|
einfo() {
|
|
echo -e " ${NOCOLOR-\e[1;32m*\e[0m }${*}" >&2
|
|
}
|
|
|
|
ewarn() {
|
|
echo -e " ${NOCOLOR-\e[1;33m*\e[0m }${*}" >&2
|
|
}
|
|
|
|
if command -v nvim > /dev/null 2>&1; then
|
|
einfo "updating nvim"
|
|
BOOTSTRAP_NEOVIM=1 nvim --headless
|
|
nvim --headless "+Lazy! restore" +TSUpdateSync +qa || ewarn "nvim ended with status $?"
|
|
fi
|
|
|
|
if command -v pipx > /dev/null 2>&1; then
|
|
einfo "updating pipx packages"
|
|
pipx upgrade-all || die "pipx update failed"
|
|
fi
|
|
|
|
if [ -d ~/.mozilla/firefox ]; then
|
|
for i in ~/.mozilla/firefox/*/; do
|
|
einfo "installing Betterfox in $i"
|
|
cp -v ~/.mozilla/Betterfox/user.js "$i"
|
|
done
|
|
else
|
|
ewarn "not installing Betterfox because firefox config directory wasn't found"
|
|
fi
|
|
|
|
export GOFLAGS="-buildmode=pie -trimpath '-ldflags=-linkmode=external -s'"
|
|
if command -v go > /dev/null 2>&1; then
|
|
einfo "updating uosc ziggy"
|
|
go build -C "$HOME/.config/mpv/submodules/uosc" -o "$HOME/.config/mpv/scripts/uosc/bin/ziggy-linux" "$HOME/.config/mpv/submodules/uosc/src/ziggy" || die "ziggy build failed"
|
|
else
|
|
ewarn "not building ziggy because go is not installed"
|
|
fi
|