Update aliae
configuration script
This commit is contained in:
parent
e4f3abca2f
commit
b9b192c42a
1 changed files with 19 additions and 12 deletions
|
@ -10,28 +10,35 @@ begin
|
|||
function configureSW -V dir
|
||||
source "$dir/../bash/profile.fish"
|
||||
source "$dir/../fish/profile.fish"
|
||||
set -l file /etc/aliae/aliae.yml
|
||||
echo "export ALIAE_CONFIG=$(string escape "$file")" | sudo tee /etc/profile.d/aliae.sh > /dev/null
|
||||
set -l file (pwsh -CommandWithArgs '. $args[0]; Get-GlobalConfigPath' "$dir/Constants.ps1");
|
||||
sudo install -Dm644 "$dir/aliae.yml" "$file"
|
||||
|
||||
begin
|
||||
printf %s\n \
|
||||
"# aliae" \
|
||||
'eval "$(aliae init bash)"' \
|
||||
"if [ -f $(string escape $file) ]" \
|
||||
'then' \
|
||||
" eval \"\$(aliae init bash --config $(string escape $file))\"" \
|
||||
'fi' \
|
||||
'' \
|
||||
'if [ -n "$ALIAE_CONFIG" ] && [ -f "$ALIAE_CONFIG" ] || [ -f ~/.aliae.yaml ]' \
|
||||
'then' \
|
||||
' eval "$(aliae init bash)"' \
|
||||
'fi' \
|
||||
'' \
|
||||
'eval "$(aliae completion bash)"'
|
||||
end | installBashProfile "aliae" "aliae"
|
||||
|
||||
begin
|
||||
printf %s\n "" \
|
||||
"# aliae" \
|
||||
'eval "$(aliae init bash)"' \
|
||||
'eval "$(aliae completion bash)"'
|
||||
end | sudo tee /etc/skel/.bashrc > /dev/null
|
||||
|
||||
if type -q fish
|
||||
begin
|
||||
printf %s\n \
|
||||
"aliae init fish | source" \
|
||||
"if [ -f $(string escape $file) ]" \
|
||||
" eval \"\$(aliae init bash --config $(string escape $file))\"" \
|
||||
'end' \
|
||||
'' \
|
||||
'if [ -n "$ALIAE_CONFIG" ] && [ -f "$ALIAE_CONFIG" ] || [ -f ~/.aliae.yaml ]' \
|
||||
' aliae init fish | source' \
|
||||
'end' \
|
||||
'' \
|
||||
"aliae completion fish | source"
|
||||
end | installFishProfile "aliae" "aliae"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue