Shell script cleanups

This commit is contained in:
Daniel Goldberg 2020-02-10 13:53:24 +02:00
parent 892096a3b3
commit bd79ead2e6
2 changed files with 6 additions and 8 deletions

View File

@ -120,10 +120,11 @@ sudo apt install build-essentials
log_message "Installing or updating pip"
# shellcheck disable=SC2086
pip_url=https://bootstrap.pypa.io/get-pip.py
if exists wget; then
wget --output-document=get-pip.py https://bootstrap.pypa.io/get-pip.py
wget --output-document=get-pip.py $pip_url
else
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
curl $pip_url -o get-pip.py
fi
${python_cmd} get-pip.py
rm get-pip.py
@ -175,11 +176,11 @@ log_message "Generating certificate"
# Update node
if ! exists npm; then
log_message "Installing nodejs"
# shellcheck disable=SC2086
node_src=https://deb.nodesource.com/setup_12.x
if exists curl; then
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sL $node_src | sudo -E bash -
else
wget -q -O - https://deb.nodesource.com/setup_12.x | sudo -E bash -
wget -q -O - $node_src | sudo -E bash -
fi
sudo apt-get install -y nodejs
fi

View File

@ -109,9 +109,6 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName,
return
}
"Installing pywin32"
python -m pip install --user pywin32
"Installing python packages for island"
$islandRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR | Join-Path -ChildPath "\requirements.txt" -ErrorAction Stop
& python -m pip install --user -r $islandRequirements