10 lines
296 B
Bash
Executable file
10 lines
296 B
Bash
Executable file
#!/bin/sh -e
|
|
arg=$1
|
|
name=$2
|
|
location="/usr/local/bin/${name:-$(basename "$arg")}"
|
|
case "$arg" in
|
|
(*://*) curl "$arg" | sudo tee "$location" > /dev/null;;
|
|
(*) sudo cp "$arg" "$location";;
|
|
esac
|
|
sudo chmod +x "$location"
|
|
test "$INSTALEE_VERBOSE" -lt 3 || echo "Installed $name to $location"
|