2022-07-05 12:41:16 +02:00
|
|
|
#!/bin/sh -e
|
2022-07-04 23:14:58 +02:00
|
|
|
arg=$1
|
|
|
|
name=$2
|
2022-02-08 15:57:42 +01:00
|
|
|
location="/usr/local/bin/${name:-$(basename "$arg")}"
|
2022-07-05 12:07:18 +02:00
|
|
|
case "$arg" in
|
|
|
|
(*://*) curl "$arg" | sudo tee "$location" > /dev/null;;
|
2022-07-05 12:41:16 +02:00
|
|
|
(*) sudo cp "$arg" "$location";;
|
2022-07-05 12:07:18 +02:00
|
|
|
esac
|
2022-02-08 15:57:42 +01:00
|
|
|
sudo chmod +x "$location"
|
|
|
|
test "$INSTALEE_VERBOSE" -lt 3 || echo "Installed $name to $location"
|