Use function for adding bash
profile settings
This commit is contained in:
parent
d601f09a9c
commit
6997511486
1 changed files with 2 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||||
|
. "../bash/profile.sh";
|
||||||
|
|
||||||
if ! grep "\baliae\b" ~/.bashrc > /dev/null
|
if ! grep "\baliae\b" ~/.bashrc > /dev/null
|
||||||
then
|
then
|
||||||
|
@ -21,11 +22,8 @@ contextRoot="$(mktemp -d)";
|
||||||
pushd "$contextRoot" > /dev/null;
|
pushd "$contextRoot" > /dev/null;
|
||||||
|
|
||||||
{
|
{
|
||||||
dump_bash;
|
|
||||||
echo 'eval "$(aliae completion bash)"';
|
echo 'eval "$(aliae completion bash)"';
|
||||||
} > "aliae.sh";
|
} | addBashProfile "aliae" "aliae";
|
||||||
|
|
||||||
sudo install -Dm755 aliae.sh /etc/bash/conf.d/aliae.sh
|
|
||||||
|
|
||||||
popd > /dev/null;
|
popd > /dev/null;
|
||||||
rm -rf "$contextRoot";
|
rm -rf "$contextRoot";
|
||||||
|
|
Loading…
Reference in a new issue