Skip to content

Instantly share code, notes, and snippets.

@rayantony
Created August 30, 2016 09:59
Show Gist options
  • Select an option

  • Save rayantony/70e9782dc510d6d5dfb98504382dfc69 to your computer and use it in GitHub Desktop.

Select an option

Save rayantony/70e9782dc510d6d5dfb98504382dfc69 to your computer and use it in GitHub Desktop.
installing and running live web to shell using curl wget busybox
#!/bin/bash -i
set -e
sh_c='sh -c'
# test
# curl this with qjkL silent and it should work as expected last line for demo sake only
command_exists() {
command -v "$@" > /dev/null 2>&1
}
curl=''
if command_exists curl; then
curl='curl -sSL'
elif command_exists wget; then
curl='wget -qO-'
elif command_exists busybox && busybox --list-modules | grep -q wget; then
curl='busybox wget -qO-'
fi
printf "\n contents of curl are $curl \n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment