instalee/handlers/script/install

11 lines
288 B
Plaintext
Raw Normal View History

#!/bin/sh
arg=$1
name=$2
location="/usr/local/bin/${name:-$(basename "$arg")}"
2022-07-05 10:07:18 +00:00
case "$arg" in
(*://*) curl "$arg" | sudo tee "$location" > /dev/null;;
(*) cp "$arg" "$location";;
esac
sudo chmod +x "$location"
test "$INSTALEE_VERBOSE" -lt 3 || echo "Installed $name to $location"