Install aliae
config using common script
This commit is contained in:
parent
f3eb4ec970
commit
90f85e227d
3 changed files with 9 additions and 13 deletions
4
scripts/Common/Config/aliae/install.ps1
Normal file
4
scripts/Common/Config/aliae/install.ps1
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/pwsh
|
||||
. "$PSScriptRoot/../powershell/profile.ps1";
|
||||
|
||||
Add-PowerShellProfileStatement -Statement "# aliae`naliae init pwsh | Invoke-Expression";
|
|
@ -1,9 +1,6 @@
|
|||
#!/bin/bash
|
||||
SKIP_POWERSHELL=${SKIP_POWERSHELL:-0};
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
|
||||
. "../../Scripts/is-truthy.sh";
|
||||
|
||||
if ! grep "\baliae\b" ~/.bashrc > /dev/null
|
||||
then
|
||||
{
|
||||
|
@ -13,15 +10,11 @@ then
|
|||
} >> ~/.bashrc;
|
||||
fi;
|
||||
|
||||
if ! isTruthy "${SKIP_POWERSHELL}"
|
||||
then
|
||||
profileFile="$(pwsh -c '$PROFILE')";
|
||||
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;
|
||||
if [ ! -f "$profileFile" ] || ! grep "\baliae\b" "$profileFile" > /dev/null
|
||||
then
|
||||
pwsh "./install.ps1";
|
||||
fi;
|
||||
|
||||
echo 'aliae init fish | source' | sudo tee /etc/fish/conf.d/aliae.fish > /dev/null;
|
||||
|
|
|
@ -12,10 +12,9 @@ Set-Content $script (
|
|||
[string]::Join(
|
||||
"`n",
|
||||
@(
|
||||
"SKIP_POWERSHELL=1 bash `"$PSScriptRoot/../../../Common/Config/aliae/install.sh`"",
|
||||
"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;
|
Loading…
Reference in a new issue