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

19 lines
453 B
Bash
Executable file

#!/bin/bash
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" bash "$BASH_SOURCE" "$USER";
else
bin=oh-my-posh;
contextRoot="$(mktemp -d)";
pushd "$contextRoot" > /dev/null;
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O "$bin";
install "$bin" /usr/local/bin;
popd > /dev/null;
rm -rf "$contextRoot";
fi