instalee/handlers/script/install

11 lines
288 B
Bash
Executable File

#!/bin/sh
arg=$1
name=$2
location="/usr/local/bin/${name:-$(basename "$arg")}"
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"