wip
This commit is contained in:
parent
f927596b3c
commit
d451150b77
1 changed files with 8 additions and 6 deletions
14
pika.sh
14
pika.sh
|
@ -264,18 +264,20 @@ script-exists() {
|
|||
check-pika() {
|
||||
local url tmp bin
|
||||
url="https://git.k4li.de/scripts/installs/raw/branch/main/pika.sh"
|
||||
tmp="$(mktemp)"
|
||||
bin=/usr/local/bin/pika
|
||||
tmp="$(mktemp -d)"
|
||||
bin=/usr/bin/pika
|
||||
|
||||
if ! command-exists pika; then
|
||||
pen "The 'pika' binary was not found on this system."
|
||||
if confirm "Do you want to install it now?" </dev/tty; then
|
||||
curl -o $tmp -fsSL "$url"
|
||||
cd $tmp || mkdir -p $tmp && cd $tmp
|
||||
if curl -o pika -fsSL "$url"; then
|
||||
$_sudo chmod +x ./pika
|
||||
fi
|
||||
|
||||
if [ -f "$tmp" ]; then
|
||||
if [ -f "${tmp}/pika" ]; then
|
||||
pen bold red "Copying binary now to $bin"
|
||||
$_sudo cp $tmp $bin
|
||||
$_sudo chmod +x $bin
|
||||
$_sudo cp "${tmp}/pika" $bin
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue