-
Notifications
You must be signed in to change notification settings - Fork 40
/
help_linux
executable file
·32 lines (28 loc) · 1.32 KB
/
help_linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# ************swarm_help**************************************************
#
#
# This will start swarm with -help command.
# This will run through a guided setup to start SWARM.
# When finished it will save your settings.
# It will install pwsh if not installed.
# Once you have first ran SWARM, you can run this guided help again
# through terminal with the commmand ``swarm_help``
# This command can be ran at anytime, and will allow you to change arguments
# and settings within SWARM, and give you the arguments you wish to use for
# HiveOS flight sheet.
## If powershell doesn't exist- Assume it is a first time run.
if ! [ -x "$(command -v pwsh)" ]; then
echo 'pwsh not found- installing 7.0.0-rc.3'
wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.0-rc.3/powershell-7.0.0-rc.3-linux-x64.tar.gz -O /tmp/powershell.tar.gz --no-check-certificate
mkdir -p /opt/microsoft/powershell/7.0.0-rc.3
tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7.0.0-rc.3
chmod +x /opt/microsoft/powershell/7.0.0-rc.3/pwsh
ln -s /opt/microsoft/powershell/7.0.0-rc.3/pwsh /usr/bin/pwsh
rm -rf /tmp/powershell.tar.gz
chmod 777 -R $HOME/.local/share/powershell
echo 'starting install script'
pwsh -command ".\build\powershell\scripts\install.ps1"
fi
## Start the help script.
pwsh -command ".\build\powershell\scripts\help.ps1"