2022-11-12 13:42:41 +00:00
|
|
|
#!/bin/bash
|
2023-04-01 15:16:00 +00:00
|
|
|
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
|
|
|
|
|
2022-11-12 13:42:41 +00:00
|
|
|
# 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
|
2023-01-23 14:55:10 +00:00
|
|
|
bin=oh-my-posh;
|
2023-01-23 15:11:51 +00:00
|
|
|
contextRoot="$(mktemp -d)";
|
2023-03-16 19:14:49 +00:00
|
|
|
pushd "$contextRoot" > /dev/null;
|
2022-11-12 13:42:41 +00:00
|
|
|
|
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;
|
2022-11-12 13:42:41 +00:00
|
|
|
|
2023-03-16 19:14:49 +00:00
|
|
|
popd > /dev/null;
|
2023-01-23 15:11:51 +00:00
|
|
|
rm -rf "$contextRoot";
|
2022-11-13 00:11:32 +00:00
|
|
|
fi
|