2022-07-05 12:41:16 +02:00
|
|
|
#!/bin/sh -e
|
2022-11-24 15:03:57 +01:00
|
|
|
test "$INSTALEE_VERBOSE" -lt 10 || set -x
|
2022-07-04 23:14:58 +02:00
|
|
|
arg=$1
|
2022-11-24 15:03:57 +01:00
|
|
|
name="${2:-$(basename "$arg")}"
|
|
|
|
location="/usr/local/bin/${name}"
|
2022-07-05 12:07:18 +02:00
|
|
|
case "$arg" in
|
2022-11-24 15:03:57 +01:00
|
|
|
(*://*) sudo wget --no-verbose -O "$location" "$arg";;
|
|
|
|
(*) sudo cp -v "$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"
|