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
|
function configureSW -V dir
|
||||||
source "$dir/../bash/profile.fish"
|
source "$dir/../bash/profile.fish"
|
||||||
source "$dir/../fish/profile.fish"
|
source "$dir/../fish/profile.fish"
|
||||||
set -l file /etc/aliae/aliae.yml
|
set -l file (pwsh -CommandWithArgs '. $args[0]; Get-GlobalConfigPath' "$dir/Constants.ps1");
|
||||||
echo "export ALIAE_CONFIG=$(string escape "$file")" | sudo tee /etc/profile.d/aliae.sh > /dev/null
|
|
||||||
sudo install -Dm644 "$dir/aliae.yml" "$file"
|
sudo install -Dm644 "$dir/aliae.yml" "$file"
|
||||||
|
|
||||||
begin
|
begin
|
||||||
printf %s\n \
|
printf %s\n \
|
||||||
"# aliae" \
|
"if [ -f $(string escape $file) ]" \
|
||||||
'eval "$(aliae init bash)"' \
|
'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)"'
|
'eval "$(aliae completion bash)"'
|
||||||
end | installBashProfile "aliae" "aliae"
|
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
|
if type -q fish
|
||||||
begin
|
begin
|
||||||
printf %s\n \
|
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"
|
"aliae completion fish | source"
|
||||||
end | installFishProfile "aliae" "aliae"
|
end | installFishProfile "aliae" "aliae"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue