===
Just organizing scripts and parts of scripts to refine my methods and do a better job at sanitizing and being uniform across projects
===
Just organizing scripts and parts of scripts to refine my methods and do a better job at sanitizing and being uniform across projects
| #!/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" | |