2021-02-25 22:02:27 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Post install ybcon script
|
2021-02-25 17:57:49 +01:00
|
|
|
|
2021-03-03 13:35:55 +01:00
|
|
|
ybconDir="/opt/share/ybcon.d"
|
2021-03-03 13:24:16 +01:00
|
|
|
ln -sf "/opt/yerbacon/bin/ybcon" "/usr/bin/ybcon"
|
2021-02-26 14:22:12 +01:00
|
|
|
fishLoc="/usr/share/fish/vendor_completions.d"
|
2021-02-25 22:02:27 +01:00
|
|
|
bashcompleteLoc="/etc/bash_completion.d"
|
2021-02-27 22:17:03 +01:00
|
|
|
zshLoc="/etc/zsh_completion.d"
|
2021-02-25 22:02:27 +01:00
|
|
|
if [ -d $bashcompleteLoc ]; then
|
2021-02-28 19:30:52 +01:00
|
|
|
ln -sf "$ybconDir/completions/bash-completion.sh" "$bashcompleteLoc/ybcon.sh"
|
2021-02-26 14:22:12 +01:00
|
|
|
fi
|
|
|
|
|
2021-02-26 14:24:42 +01:00
|
|
|
if [ -f "/usr/bin/fish" ]; then
|
2021-02-26 14:22:12 +01:00
|
|
|
if [ ! -d $fishLoc ]; then
|
|
|
|
mkdir "$fishLoc"
|
|
|
|
fi
|
2021-02-28 19:30:52 +01:00
|
|
|
ln -sf "$ybconDir/completions/fish-completion.fish" "$fishLoc/ybcon.fish"
|
2021-02-27 22:17:03 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
zshBin="/usr/bin/zsh"
|
|
|
|
if [ -f $zshBin ]; then
|
|
|
|
if [ -d $zshLoc ]; then
|
2021-02-28 19:30:52 +01:00
|
|
|
ln -sf "$ybconDir/completions/zsh-completion.zsh" "$zshLoc/_ybcon"
|
2021-02-27 22:17:03 +01:00
|
|
|
fi
|
2021-02-25 22:02:27 +01:00
|
|
|
fi
|