2024-07-16 01:30:14 +00:00
|
|
|
#!/bin/env fish
|
|
|
|
begin
|
|
|
|
set -l dir (status dirname)
|
|
|
|
source "$dir/../../Scripts/software.fish"
|
|
|
|
|
|
|
|
function configureSW -V dir
|
|
|
|
source "$dir/../bash/profile.fish"
|
|
|
|
source "$dir/../fish/profile.fish"
|
2024-08-23 22:42:57 +00:00
|
|
|
set -l file (pwsh -CommandWithArgs '. $args[0]; Get-GlobalConfigPath' "$dir/Constants.ps1");
|
2024-07-16 01:30:14 +00:00
|
|
|
sudo install -Dm644 "$dir/aliae.yml" "$file"
|
|
|
|
|
|
|
|
begin
|
2024-07-28 14:57:47 +00:00
|
|
|
printf %s\n \
|
2024-08-23 22:42:57 +00:00
|
|
|
"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' \
|
|
|
|
'' \
|
2024-07-17 12:18:27 +00:00
|
|
|
'eval "$(aliae completion bash)"'
|
2024-07-16 01:30:14 +00:00
|
|
|
end | installBashProfile "aliae" "aliae"
|
|
|
|
|
|
|
|
if type -q fish
|
|
|
|
begin
|
|
|
|
printf %s\n \
|
2024-08-23 22:42:57 +00:00
|
|
|
"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' \
|
|
|
|
'' \
|
2024-07-16 01:30:14 +00:00
|
|
|
"aliae completion fish | source"
|
|
|
|
end | installFishProfile "aliae" "aliae"
|
|
|
|
end
|
2024-09-19 19:59:37 +00:00
|
|
|
|
|
|
|
sudo -HE pwsh "$dir/Main.ps1" Configure
|
2024-07-16 01:30:14 +00:00
|
|
|
end
|
|
|
|
|
2024-09-19 19:56:32 +00:00
|
|
|
function userConfig -V dir -a user
|
2024-09-22 21:51:38 +00:00
|
|
|
runPSUserConfig "$dir/Main.ps1" $user
|
2024-09-19 19:56:32 +00:00
|
|
|
end
|
|
|
|
|
2024-07-16 01:30:14 +00:00
|
|
|
runInstaller $argv
|
|
|
|
end
|