-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(install): Single command install with curl (#64)
Co-authored-by: Addon Factory template <[email protected]>
- Loading branch information
Ryan Faircloth
and
Addon Factory template
authored
Apr 29, 2021
1 parent
ccd2ccb
commit 7ccd01f
Showing
4 changed files
with
54 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
BRANCH=${BRANCH:=install-from-url} | ||
echo using $BRANCH | ||
URL=https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/${BRANCH}/deploy/install_full.bash | ||
|
||
function download { | ||
scratch="$(mktemp -d -t tmp.XXXXXXXXXX)" || exit | ||
script_file="$scratch/install_full.bash" | ||
|
||
echo "Downloading SC4SNMP Install Script: $URL" | ||
curl -s -# "$URL" > "$script_file" || exit | ||
chmod 775 "$script_file" | ||
|
||
echo "Running install script from: $script_file" | ||
bash "$script_file" "$@" | ||
} | ||
|
||
if { command true < /dev/tty; } > /dev/null 2>&1; then | ||
# Grab prompt input from the tty. | ||
download "$@" < /dev/tty | ||
else | ||
download "$@" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters