changed the function for installing oh-my-posh
This commit is contained in:
parent
f5990ed048
commit
ad3c854e3e
1 changed files with 21 additions and 0 deletions
21
.bashrc
21
.bashrc
|
@ -94,6 +94,27 @@ _init() {
|
|||
else
|
||||
if command_exists curl; then
|
||||
curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d /usr/bin/
|
||||
binDirs=(
|
||||
"$HOME/.local/bin"
|
||||
"/usr/local/bin"
|
||||
"/usr/bin"
|
||||
)
|
||||
|
||||
while ! command_exists oh-my-posh; do
|
||||
for binDir in "${binDirs[@]}"; do
|
||||
case "$binDir" in
|
||||
"$HOME/.local/bin")
|
||||
echo_info "Installing oh-my-posh into $binDir"
|
||||
curl -s https://ohmyposh.dev/install.sh | bash -s -- -d "$binDir"
|
||||
;;
|
||||
*)
|
||||
echo_info "Installing oh-my-posh into $binDir"
|
||||
curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d "$binDir"
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue