fix(handlers): use args rather than stdin
This commit is contained in:
parent
b8bf73c17e
commit
f75d416abe
3 changed files with 4 additions and 6 deletions
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Install a package from a local or downloaded .deb-file and remove it
|
# Install a package from a local or downloaded .deb-file and remove it
|
||||||
loc="/tmp/install.deb"
|
loc="/tmp/install.deb"
|
||||||
arg="$(read)"
|
case "$1" in
|
||||||
case "$arg" in
|
|
||||||
(http*) sudo wget -O "$loc" "$arg";;
|
(http*) sudo wget -O "$loc" "$arg";;
|
||||||
(*) loc="$arg";;
|
(*) loc="$arg";;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
arg="$(read)"
|
cd "$1"
|
||||||
cd "$arg"
|
|
||||||
sudo checkinstall
|
sudo checkinstall
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
read arg
|
arg=$1
|
||||||
read name
|
name=$2
|
||||||
location="/usr/local/bin/${name:-$(basename "$arg")}"
|
location="/usr/local/bin/${name:-$(basename "$arg")}"
|
||||||
curl "$arg" | sudo tee "$location" > /dev/null
|
curl "$arg" | sudo tee "$location" > /dev/null
|
||||||
sudo chmod +x "$location"
|
sudo chmod +x "$location"
|
||||||
|
|
Loading…
Add table
Reference in a new issue