Add aliae to all OSes
This commit is contained in:
parent
3b0a4e6956
commit
638d241973
5 changed files with 83 additions and 0 deletions
10
scripts/Arch/Software/aliae/install.sh
Executable file
10
scripts/Arch/Software/aliae/install.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||||
|
|
||||||
|
yay --noconfirm -Syu \
|
||||||
|
aliae-bin \
|
||||||
|
;
|
||||||
|
|
||||||
|
. "../../../Common/Config/aliae/install.sh";
|
||||||
|
|
||||||
|
popd > /dev/null;
|
16
scripts/Common/Config/aliae/aliae.yml
Normal file
16
scripts/Common/Config/aliae/aliae.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
alias: []
|
||||||
|
env: []
|
||||||
|
path: []
|
||||||
|
script:
|
||||||
|
- value: |
|
||||||
|
[ -f /bash/conf.d/* ] && . /bash/conf.d/* || true
|
||||||
|
if: match .Shell "bash"
|
||||||
|
- value: |
|
||||||
|
# Profile Files
|
||||||
|
$profileRoot = Split-Path -Parent $PROFILE;
|
||||||
|
$profilePath = "$profileRoot/profile.d/*.ps1";
|
||||||
|
|
||||||
|
if (Test-Path $profilePath) {
|
||||||
|
Get-Item $profilePath | ForEach-Object { . $_; };
|
||||||
|
}
|
||||||
|
if: match .Shell "pwsh"
|
29
scripts/Common/Config/aliae/install.sh
Executable file
29
scripts/Common/Config/aliae/install.sh
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
SKIP_POWERSHELL=${SKIP_POWERSHELL:-0};
|
||||||
|
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||||
|
|
||||||
|
. "../../Scripts/is-truthy.sh";
|
||||||
|
|
||||||
|
if ! grep "\baliae\b" ~/.bashrc > /dev/null
|
||||||
|
then
|
||||||
|
{
|
||||||
|
echo '# aliae';
|
||||||
|
echo 'eval "$(aliae init bash)"';
|
||||||
|
echo "";
|
||||||
|
} >> ~/.bashrc;
|
||||||
|
fi;
|
||||||
|
|
||||||
|
if ! isTruthy "${SKIP_POWERSHELL}"
|
||||||
|
then
|
||||||
|
profileFile="$(pwsh -c '$PROFILE')";
|
||||||
|
|
||||||
|
if [ ! -f "$profileFile" ] || grep "\baliae\b" "$profileFile" > /dev/null
|
||||||
|
then
|
||||||
|
install -dm755 "$(dirname "$profileFile")";
|
||||||
|
echo "aliae init pwsh | Invoke-Expression" >> "$profileFile";
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
|
|
||||||
|
echo 'aliae init fish | source' | sudo tee /etc/fish/conf.d/aliae.fish > /dev/null;
|
||||||
|
cp aliae.yml ~/.aliae.yaml;
|
||||||
|
popd > /dev/null;
|
21
scripts/Windows/Config/aliae/Install.ps1
Normal file
21
scripts/Windows/Config/aliae/Install.ps1
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/pwsh
|
||||||
|
param($context);
|
||||||
|
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
||||||
|
|
||||||
|
[Context] $context = $context;
|
||||||
|
$script = New-TemporaryFile;
|
||||||
|
$script = Rename-Item $script "$($script.Name).sh" -PassThru;
|
||||||
|
|
||||||
|
Write-Information "Preparing setup script";
|
||||||
|
|
||||||
|
Set-Content $script (
|
||||||
|
[string]::Join(
|
||||||
|
"`n",
|
||||||
|
@(
|
||||||
|
"SKIP_POWERSHELL=1 bash `"$PSScriptRoot/../../../Common/Config/aliae/install.sh`"",
|
||||||
|
"rm ~/.bashrc")));
|
||||||
|
|
||||||
|
$context.AddPowerShellProfileStatement("# aliae`naliae init pwsh | Invoke-Expression");
|
||||||
|
Write-Information "Running prepared script";
|
||||||
|
Start-Process -Wait $script;
|
||||||
|
Remove-Item $script;
|
7
scripts/Windows/Software/aliae/Install.ps1
Normal file
7
scripts/Windows/Software/aliae/Install.ps1
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/pwsh
|
||||||
|
param($context);
|
||||||
|
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
||||||
|
|
||||||
|
[Context] $context = $context;
|
||||||
|
winget install --accept-source-agreements --accept-package-agreements -s winget --scope machine -e --id JanDeDobbeleer.Aliae;
|
||||||
|
. "$PSScriptRoot/../../Config/Aliae/Install.ps1" $context;
|
Loading…
Reference in a new issue