Use function for adding bash profile settings

This commit is contained in:
Manuel Thalmann 2024-03-20 21:15:50 +01:00
parent d601f09a9c
commit 6997511486

View file

@ -1,5 +1,6 @@
#!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null;
. "../bash/profile.sh";
if ! grep "\baliae\b" ~/.bashrc > /dev/null
then
@ -21,11 +22,8 @@ contextRoot="$(mktemp -d)";
pushd "$contextRoot" > /dev/null;
{
dump_bash;
echo 'eval "$(aliae completion bash)"';
} > "aliae.sh";
sudo install -Dm755 aliae.sh /etc/bash/conf.d/aliae.sh
} | addBashProfile "aliae" "aliae";
popd > /dev/null;
rm -rf "$contextRoot";