PortValhalla/scripts/Common/Software/Oh My Posh/install.sh

19 lines
453 B
Bash
Raw Normal View History

#!/bin/bash
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
# Elevate script
if [ ! "$UID" -eq 0 ]
then
2023-05-04 23:07:24 +00:00
sudo NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" bash "$BASH_SOURCE" "$USER";
2022-11-13 00:11:32 +00:00
else
bin=oh-my-posh;
2023-01-23 15:11:51 +00:00
contextRoot="$(mktemp -d)";
pushd "$contextRoot" > /dev/null;
2023-01-23 15:11:51 +00:00
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O "$bin";
install "$bin" /usr/local/bin;
popd > /dev/null;
2023-01-23 15:11:51 +00:00
rm -rf "$contextRoot";
2022-11-13 00:11:32 +00:00
fi