Skip to content

Instantly share code, notes, and snippets.

@parisk
Last active July 19, 2021 20:21
Show Gist options
  • Save parisk/903d699ef969e9ffb4ca87b6690b8959 to your computer and use it in GitHub Desktop.
Save parisk/903d699ef969e9ffb4ca87b6690b8959 to your computer and use it in GitHub Desktop.
cURL on SourceLair with SFTP support
# This script installs cURL with SFTP support on SourceLair
# As it needs Linuxbrew to do so, it will install Linuxbrew as well, if it does not exist already
# Step 0 - Install Linuxbrew (If not already installed)
if ! [ -x "$(command -v brew)" ]; then
echo 'Installing Linuxbrew.'
echo -e 'export PATH="$HOME/.linuxbrew/bin:$PATH"\nexport MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"\nexport INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"' > ~/.bashrc && source ~/.bashrc
ruby -e "$(wget -O- https://raw.github.com/Homebrew/linuxbrew/go/install)"
brew update
brew doctor
fi
# Step 1 - Install libssh2
brew install libssh2
# Step 2 - Install cURL with libssh2 support (consequently with SFTP support as well)
brew install curl --with-libssh2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment