fix(handlers): use args rather than stdin

This commit is contained in:
xeruf 2022-07-04 23:14:58 +02:00
parent b8bf73c17e
commit f75d416abe
3 changed files with 4 additions and 6 deletions

View file

@ -1,8 +1,7 @@
#!/bin/sh
# Install a package from a local or downloaded .deb-file and remove it
loc="/tmp/install.deb"
arg="$(read)"
case "$arg" in
case "$1" in
(http*) sudo wget -O "$loc" "$arg";;
(*) loc="$arg";;
esac

View file

@ -1,4 +1,3 @@
#!/usr/bin/env sh
arg="$(read)"
cd "$arg"
cd "$1"
sudo checkinstall

View file

@ -1,6 +1,6 @@
#!/bin/sh
read arg
read name
arg=$1
name=$2
location="/usr/local/bin/${name:-$(basename "$arg")}"
curl "$arg" | sudo tee "$location" > /dev/null
sudo chmod +x "$location"